concat() — Concatenate strings in Power Automate
Build friendly strings safely (and avoid null coercion) using concat().
From concat() to coalesce() and
formatDateTime(), plus governance and ALM that make your flows production-ready.
{
"featuredExpression": "if()",
"description": "Return one value if a condition is true, another if false.",
"example": "if(equals(variables('env'),'prod'),'Strict','Relaxed')"
}
Build friendly strings safely (and avoid null coercion) using concat().
Format UTC or custom timestamps for filenames, keys and messages.
Return the first non-null/empty value from a list.
Keep your flow logic readable with if().
Safely access trigger headers/body without null errors.
Extract a segment of text by start and length.
Replace exact text (case-sensitive).
Compute future/past dates with a specific format.
Split by a delimiter; great with first()/last().
Join array items to a comma-separated string.
Works on arrays and strings; perfect for guards.
Simple starts-with logic; pair with toLower().
Check if a filename ends in .pdf, etc.
Normalize casing early to avoid brittle comparisons.
Generate unique IDs for files, keys, correlation, etc.
Add or subtract days from a date value.
addDays(utcNow(), 7, 'yyyy-MM-dd')
Return the first non-empty or non-null value from a list.
coalesce(triggerBody()?['subject'], variables('fallback'))
Concatenate strings safely, avoiding null issues.
concat('Hello ', coalesce(triggerOutputs()?['headers']['x-ms-client-user'], 'there'))
Check whether text ends with a specified substring.
endsWith(variables('filename'), '.pdf')
Format a timestamp or date in a specific pattern.
formatDateTime(utcNow(), 'yyyy-MM-dd HH:mm')
Generate a globally unique identifier (GUID).
guid()
Return one value if a condition is true, another if false.
if(equals(variables('env'),'prod'),'Strict','Relaxed')
Join array values into a single string with a separator.
join(variables('items'), ', ')
Count characters in a string or items in an array.
if(greater(length(variables('arr')),0),'has items','empty')
Description
Example
Replace occurrences of text inside a string.
replace(toLower(variables('text')), 'old', 'new')
Split a string into an array using a delimiter.
split('a,b,c', ',')
Check whether text starts with a specified substring.
startsWith(toLower(variables('name')), 'abc')
Extract a substring by start index and length.
substring(variables('text'), 0, 10)
Convert text to lowercase for case-insensitive comparisons.
toLower(variables('text'))
Access trigger data or headers from the flow trigger event.
triggerOutputs()?.headers?['x-ms-client-user']
Tables, relationships, security roles, and data modeling best practices.
View postsAutomations, flows, and expression patterns for real-world scenarios.
View postsMonthly roundups on expressions, flows, components, and governance—no spam.
By subscribing you agree to our privacy policy.
MrExpression is a focused blog covering Power Automate expressions and the broader Power Platform: real-world walkthroughs, reusable patterns, and governance tips. Built by practitioners for practitioners.