Introduction
Power Automate expressions are formulas used in Microsoft Power Automate flows to manipulate data, apply logic, and control automation behavior dynamically.
They allow you to build smarter, more flexible automation flows by working with:
Text (strings)
Numbers
Dates and times
Arrays
Objects
Logical conditions
Why Expressions Matter
Expressions make your flows dynamic and intelligent. For example:
Automatically format dates in emails
Check if a field is empty before proceeding
Combine multiple values into a single string
Calculate due dates
Extract part of a filename
Handle null values safely
Without expressions, flows would be limited to simple, static automation.
Where Expressions Are Used
In Power Automate, expressions can be added in:
Condition actions
Compose actions
Initialize/Set Variable
Dynamic content fields
Filter array
Apply to each
Email subjects, file names, approval text, etc.
They are written using a function-style syntax like:
functionName(parameter1, parameter2)Example:
concat('Hello ', triggerBody()?['FirstName'])How Expressions Work
Expressions:
Are case-sensitive
Use parentheses
()Accept values, variables, or other expressions as parameters
Can be nested inside each other
Example of nesting:
if(equals(length('Power'),5),'Correct','Incorrect')In short, expressions are the logic engine behind smart automation in Power Automate.
🔤 String Functions
| Expression | Description | Example |
|---|---|---|
concat(a, b, ...) | Combine multiple strings | concat('Flow','-','CheatSheet') → "Flow-CheatSheet" |
substring(text, start, length) | Return part of a string | substring('PowerAutomate',0,5) → "Power" |
length(text) | Number of characters | length('Functions') → 9 |
split(text, delim) | Split string into array | split('A,B,C',',') → ['A','B','C'] |
toLower(text) | Convert to lowercase | toLower('Hello') → "hello" |
trim(text) | Remove leading/trailing spaces | trim(' ABC ') → "ABC" |
replace(text, old, new) | Replace substring | replace('one two',' ','-') → "one-two" |
indexOf(text, value) | First position of value | indexOf('abcde','c') → 2 |
lastIndexOf(text, value) | Last position of value | lastIndexOf('abcabc','c') → 5 |
startsWith(text, value) | Check prefix | startsWith('Hello','He') → true |

Join the conversation! Your thoughts help the community grow.