Concatenate strings
Join two or more strings together.
concat('Hello', ' ', 'World')
Result: Hello World
Software Engineer
Ready-to-use expressions and code snippets. Copy and paste directly into your Power Automate flows.
All expressions are ready to copy and paste directly into your flows.
Each expression includes an explanation of what it does and when to use it.
Find expressions easily with our category-based organization.
All expressions are tested and verified to work in Power Automate.
Join two or more strings together.
concat('Hello', ' ', 'World')
Result: Hello World
Count the number of characters in a string.
length('Power Automate')
Result: 14
Get a portion of a string starting at a specific position.
substring('Power Automate', 0, 5)
Result: Power
Transform all characters to uppercase.
toUpper('power automate')
Result: POWER AUTOMATE
Transform all characters to lowercase.
toLower('POWER AUTOMATE')
Result: power automate
Replace occurrences of a substring with another string.
replace('Hello World', 'World', 'Power Automate')
Result: Hello Power Automate
Remove leading and trailing whitespace from a string.
trim(' Power Automate ')
Result: Power Automate
Split a string by a delimiter into an array.
split('apple,banana,cherry', ',')
Result: ["apple","banana","cherry"]
Get the current UTC timestamp.
utcNow()
Result: 2025-12-31T10:30:00.0000000Z
Add a specified number of days to a date.
addDays(utcNow(), 7)
Result: Date 7 days from now
Add a specified number of hours to a date.
addHours(utcNow(), 2)
Result: Time 2 hours from now
Convert a date to a specific format.
formatDateTime(utcNow(), 'yyyy-MM-dd')
Result: 2025-12-31
Get the day of the week (0=Sunday, 6=Saturday).
dayOfWeek(utcNow())
Result: 2 (Tuesday)
Convert a date from UTC to a specific timezone.
convertTimeZone(utcNow(), 'UTC', 'Eastern Standard Time')
Result: Date in Eastern time
Get the first day of the current month.
startOfMonth(utcNow())
Result: 2025-12-01T00:00:00.0000000Z
Get the first element of an array.
first(createArray('a', 'b', 'c'))
Result: a
Get the last element of an array.
last(createArray('a', 'b', 'c'))
Result: c
Count the number of items in an array.
length(createArray('a', 'b', 'c'))
Result: 3
Check if an array contains a specific value.
contains(createArray('a', 'b', 'c'), 'b')
Result: true
Combine array elements into a single string with a separator.
join(createArray('a', 'b', 'c'), ', ')
Result: a, b, c
Remove duplicates from an array.
union(createArray('a', 'b', 'a'), createArray())
Result: ["a","b"]
Return different values based on a condition.
if(equals(1, 1), 'Yes', 'No')
Result: Yes
Check if two values are equal.
equals('hello', 'hello')
Result: true
Check if a value is empty or null.
empty('')
Result: true
Return the first non-null value from a list.
coalesce(null, '', 'default')
Result: default
Check if all conditions are true.
and(equals(1,1), greater(5,3))
Result: true
Check if any condition is true.
or(equals(1,2), greater(5,3))
Result: true
Add two or more numbers together.
add(10, 5)
Result: 15
Subtract one number from another.
sub(10, 3)
Result: 7
Multiply two numbers together.
mul(4, 5)
Result: 20
Divide one number by another.
div(20, 4)
Result: 5
Find the largest number in a set.
max(1, 5, 3, 9, 2)
Result: 9
Find the smallest number in a set.
min(1, 5, 3, 9, 2)
Result: 1
Convert a value to an integer number.
int('42')
Result: 42
Convert a value to a floating-point number.
float('3.14')
Result: 3.14
Convert a value to a string.
string(42)
Result: "42"
Convert a value to a boolean.
bool('true')
Result: true
Parse a JSON string into an object.
json('{"name":"John"}')
Result: Object with name property
URL-encode a string for use in URLs.
encodeUriComponent('hello world')
Result: hello%20world
Get a property value from an object.
body('Get_item')?['Title']
Result: The Title field value
Access a property without error if it doesn't exist.
body('Get_item')?['OptionalField']
Result: Value or null
Reference the output of a previous action.
outputs('Compose')
Result: Output of Compose action
Access data from the flow trigger.
triggerBody()
Result: Trigger body content
Get the unique identifier of the current flow run.
workflow().run.name
Result: Run ID string