Power Automate Concatenate String

In this Microsoft Power Automate tutorial, we will discuss how to concatenate strings in Power Automate or Microsoft flow. Also, we will discuss the below examples:

  • Power Automate Concatenate String
  • Power Automate concatenate a variable with string
  • Power Automate conactenate a string with string
  • Power Automate concatenate a string with number
  • Power Automate concatenate a string with date

Power Automate Concatenate String

In Power Automate we can concatenate strings by using the string concat() function.

There is a string function named Concat() that combines any number of strings together. The syntax for this function is:

Concat(text1,text2,....)

We will see this implementation in an example in Power Automate or Microsoft Flow.

If you are new to Power Automate, check out, Leave Request Approval Flow using Power Automate or Microsoft Flow

Example-1: Concat variable with string

Let’s have a look at the below example, where we will use this concat() function. For this, on Power Automate, first, we will trigger our flow manually by adding Trigger flow manually from the instant cloud flow.

Then we will add an action to Initialize the variable. Here we will give a name to our variable, set the type as a string, and value as triggered user name(it will show the user name who triggered the flow).

Power Automate concatenate string
Power Automate concatenate string

Then we will add a Compose action where we will insert an expression that will be concatenating the user name with a string. The expression is:

concat('Have a Good day',' ',variables('VarString'))
concatenate string Power Automate
concatenate string Power Automate

Similarly, we can use any string value instead of the text i.e. have a good day. For space here we use a ‘ ‘. Now our flow is ready. So just save and test the flow. The output will come like below:

Microsoft Flow concatenate string
Microsoft Flow concatenate string

As the user name is Sonam Subhadarsini so it came like this. This is how we can concatenate the strings with variable on Power Automate.

You can download this flow from here.

Also read, How to convert decimal to whole number in Power Automate

Example-2: Concat a string with another string(single line text)

In this example, we will see how to concatenate a string with another string. For example, we have a sharePoint list based on employee details having columns such as First name and last name (single-line text), Dept(choice field), joining date(date/time field).

But as per our requirement, when we will insert the employee’s data on a SharePoint list it will combine the first name and last name into full name and notify the Manager.

For this, we have discussed here the steps:

Step-1:

On Power Automate, we will add a trigger “When an item is created“.On that we have to insert our SharePoint site address and the list name that we will use.

concatenate string with string on Power Automate
concatenate string with string on Power Automate

Step-2:

Then we will add a Compose action, in that we will insert an expression that will perform the concatenation with two strings. The expression is:

concat(triggerOutputs()?['body/First_Name'],' ',triggerOutputs()?['body/Last_Name'])
Concat two strings on Power Automate
Concat two strings on Power Automate

Step-3:

Now we will add an action “Send an email“, which will notify the manager when a new employee details are created on the SharePoint list with the full name.

Concatenate two single line text on Power Automate
Concatenate two single line text on Power Automate

Now our flow is ready to run. So just save it and test it manually. When we enter first name and last name on SharePoint list:

Power Automate concatenate two single line text
Power Automate concatenate two single line text

But we can see it will contact the first name and last name on the mail:

Microsoft flow concatenate two string
Microsoft flow concatenate two string

This is how to do concatenate two strings from SharePoint list on Microsoft flow. You can download this flow from here.

Check out, How to move files from OneDrive to SharePoint using Power Automate

Example-3: Concatenate a string with a number

In this example, we will see how to concat a string with a number on Power Automate.

For this, we will add a trigger that will trigger the flow manually. On that trigger, we will use text input and number input.

concatenate string with number on Power Automate
concatenate string with number on Power Automate

Then we will add a Compose action that will concate the text with number by using an expression.

concat(triggerBody()['text'],'-',triggerBody()['number'])
concatenate string with number on Power Automate
concatenate string with number on Power Automate

When we save & test the flow manually, it will ask to enter the text and number and click on Run flow.

Concatenate a string with number on Power Automate
Concatenate a string with number on Power Automate

Now we can see the output is coming as a string with numbers by concatenating.

Power Automate flow concatenate a string with Number
Power Automate flow concatenate a string with Number

This is how we can concatenate a string with Number on Power Automate flow.

Read Scheduled cloud flow Example

Example-4: Concate a string with date

Similarly, we will use a date as an input type on Manually trigger flow. Then we will add a Compose action that will concatenate a string with a date by using an expression:

concat(triggerBody()['text'],'-',triggerBody()['date'])
Concatenate a string with date on power Automate
Concatenate a string with date on power Automate

Now the flow is ready to run. Let’s insert a text and date value to check the output:

Concat a string with date on Power Automate
Concat a string with date on Power Automate

Now we can see the output is coming by concatenating the string with date:

Power automate concat a string with number
Power automate concat a string with a number

This is how to do Power automate concat a string with a number.

Related Power Automate tutorials:

Conclusion

From this Power Automate Tutorial, we learned all about concatenate function on Power Automate. Also, we discussed all:

  • How to concatenate a string with variable on Power Automate?
  • How to concatenate a string with another string from SharePoint list?
  • How to concatenate a string with date on Microsoft flow?
  • How to concatenate a string with a number on Power Automate?
>