Do you want to know how to use Concat in Power Automate? In this Power Automate tutorial, I will show you how to concatenate strings in Power Automate. We will see a few power Automate concat string examples.
- Power Automate Concatenate Strings
- Concatenate a variable with a string in Power Automate
- How to concatenate a string with a string in Power Autoamte
- Concatenate a string with a number in Power Automate
- Power Automate concatenate a string with a date
Power Automate Concatenate Strings
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 in Power Automate. The syntax for the concat function in Power Automate is:
Concat(text1,text2,....)
Now, let us see a few implementations of concat in Power Automate.
Example-1: Concat variable with string
Let’s look at the example below, 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).
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'))
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 save and test the flow. The output will come like below:
This is how to concatenate the strings with variable on Power Automate.
You can download this flow from here.
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 in Power Automate. 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 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.
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'])
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.
Now, our flow is ready to run. So save it and test it manually. When we enter first name and last name on the SharePoint list:
But we can see it will contact the first name and last name on the mail:
This is how to concatenate two strings from the SharePoint list in Power Automate. You can download this flow from here.
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.
Then, we will add a Compose action that will concate the text with a number by using an expression. Here is the Power Automate expression for concatenate strings.
concat(triggerBody()['text'],'-',triggerBody()['number'])
When we save & test the flow manually, it will ask us to enter the text and number and click on Run flow.
Now we can see the output is coming as a string with numbers by concatenating.
This is how to concatenate a string with a number on Power Automate flow.
Example-4: Concate a string with date
Similarly, we will use a date as an input type on the manual 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'])
Now, the flow is ready to run. Let’s insert a text and date value to check the output:
Now we can see the output is coming by concatenating the string with date:
This is how to do Power Automate concat a string with a number.
Conclusion
In this tutorial, I hope you have learned how to use the concat in Power Automate. We have also seen a few examples related to Power Automate concatenate strings. If you still have any questions related to concatenate in Power Automate, add them in the comments below.
You may also like:
- do until in Power Automate
- Power Automate add days to date
- Initialize Variable in Power Automate
- Power Automate Increment Variable
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com