How to Concatenate String in Power Automate
How to Concatenate String in Power Automate
Power Automate provides various string functions that help manipulate text values within workflows. One of the most commonly used functions is concat(), which combines multiple strings into a single value.
The concat() function is useful when creating file names, email subjects, dynamic messages, record identifiers, and custom outputs.
What is concat() Function?
The concat() function joins two or more strings together and returns a single combined string.
concat( String1, String2, String3 )
Business Scenario
Suppose you need to generate a unique file name that includes a customer name and current date. Instead of manually typing the value, Power Automate can dynamically create it using the concat() function.
Example 1: Combine First Name and Last Name
concat( 'John', ' ', 'Doe' )
Output: John Doe
Example 2: Create Dynamic File Name
concat( 'Invoice_', formatDateTime( utcNow(), 'yyyyMMdd' ), '.pdf' )
Output: Invoice_20250618.pdf
Example 3: Build Email Subject
concat( 'New Request - ', triggerOutputs()?['body/title'] )
Using Variables
concat(
variables('FirstName'),
' ',
variables('LastName')
)
Common Use Cases
- Creating file names
- Building email subjects
- Generating unique identifiers
- Combining first and last names
- Creating notification messages
- Formatting output values
Benefits
- Simple string manipulation
- Supports dynamic content
- Improves workflow flexibility
- Reduces manual formatting
- Creates reusable expressions
Key Takeaways
- concat() combines multiple strings into one value.
- Supports static text and dynamic content.
- Commonly used in file names, emails, and notifications.
- Improves workflow automation and flexibility.
- Essential function for Power Automate expressions.