Using the Concat Function in Power Automate

Power Automate is a tool that is invaluable to SharePoint developers because it allows you to streamline workflows and tasks. In this blog, we’ll explore the concat function and how utilize it in a flow.

What is the Concat Function?

The concat function in Power Automate is used to join two or more strings into a single string. This is especially useful when you need to join multiple pieces of text, for example creating a full name by joining first and last names, generating a custom messages, or building dynamic file names.

Syntax of the Concat Function

concat(string1, string2, ..., stringN)

Step-by-Step Guide to Using the concat Function in Power Automate

Step1 : Create a New Flow

Go to Power Automate (flow.microsoft.com) and sign in. Create an “Instant cloud flow” and Choose a “Manually trigger a flow” selection as shown below:

Step2: Initialize Variables

Add 2 new “Initialize variable” to store the first and second part of the string. Use the below image to understand the configurations.

Step 3: Add a “Compose” action to use the concat function. Set the input to the following expression:

concat(variables('firstName'), ' ', variables('lastName'))

This will combine the ‘firstName’ and ‘lastName’ variables with a space in between.

Step 4: Test the Flow

Save and test your flow by running it manually. Check the output of the “Compose” action to see the concatenated result.

Use this below image as reference of what your flow should look like:

Feel free to leave comments or questions below if you need further assistance with implementing the concat function in Power Automate!

Spread the word

Leave a Reply