Interactive Functions Reference Map Ctrl + scroll to zoomTap a function to view examples
Search Power Automate expression functions by name or task, browse categories, and open a function for examples and usage details.
Explore 137 Power Automate expression functions with examples. Search by function name or task, browse categories, and open a function to see how it works. This independent reference is useful for building and troubleshooting cloud flows.
Search for a function such as trim or formatDateTime, or browse by category. Select a result to review its example and implementation details, then use the Microsoft Expressions Guide link for official documentation.
To work with strings, you can use these string functions and also some collection functions. String functions work only on strings.
chunk('0123456789', 3)
// Returns ['012', '345', '678', '9']concat('Hello', ' ', 'World')
// Returns 'Hello World'endsWith('Hello world', 'world')
// Returns trueformatNumber(1234567890, '#,##0.00', 'en-US')
// Returns '1,234,567,890.00'
formatNumber(17.35, 'C2')
// Returns '$17.35'
formatNumber(17.35, 'C2', 'is-IS')
// Returns '17,35 kr'guid()
// Returns e.g. 'c2ecc88d-88c8-4096-912c-d6f2e2b138ce'
guid('P')
// Returns e.g. '(c2ecc88d-88c8-4096-912c-d6f2e2b138ce)'indexOf('hello world', 'world')
// Returns 6isFloat('10.5')
// Returns true
isFloat('10.000,00', 'de-DE')
// Returns trueisInt('10')
// Returns true
isInt('10.5')
// Returns falselastIndexOf('hello world hello', 'hello')
// Returns 12length('abcd')
// Returns 4
length(createArray(0, 1, 2))
// Returns 3nthIndexOf('123456789123456789', '1', 2)
// Returns 9replace('the old string', 'old', 'new')
// Returns 'the new string'slice('Hello, World', 7, 12)
// Returns 'World'split('a,b,c', ',')
// Returns ['a', 'b', 'c']startsWith('hello world', 'hello')
// Returns truesubstring('hello world', 6, 5)
// Returns 'world'toLower('Hello World')
// Returns 'hello world'toUpper('Hello World')
// Returns 'HELLO WORLD'trim(' hello ')
// Returns 'hello'xml(trimByteOrderMark(concat(uriComponentToString('%EF%BB%BF'), '<produce><item>02</item></produce>')))
// Removes the UTF-8 BOM, then returns <produce><item>02</item></produce>To work with collections, generally arrays, strings, and sometimes, dictionaries, you can use these collection functions.
contains('hello world', 'world')
// Returns true
contains(createArray(1, 2, 3), 2)
// Returns trueempty('')
// Returns true
empty(createArray('a'))
// Returns falsefirst('hello')
// Returns 'h'
first(createArray(10, 20, 30))
// Returns 10intersection(createArray(1, 2, 3), createArray(2, 3, 4))
// Returns [2, 3]item()?['Title']
// Inside a loop, returns the Title of the current itemjoin(createArray('a', 'b', 'c'), '-')
// Returns 'a-b-c'last('hello')
// Returns 'o'
last(createArray(10, 20, 30))
// Returns 30reverse(createArray(1, 2, 3))
// Returns [3, 2, 1]skip(createArray(0, 1, 2, 3), 1)
// Returns [1, 2, 3]sort(createArray('c', 'a', 'b'))
// Returns ['a', 'b', 'c']
sort(createArray(2, 1, 0, 3))
// Returns [0, 1, 2, 3]
sort(createArray(json('{ "first": "Amalie", "last": "Rose" }'), json('{ "first": "Elise", "last": "Renee" }')), 'last')
// Returns the Elise Renee object first, then the Amalie Rose objecttake(createArray(0, 1, 2, 3), 2)
// Returns [0, 1]union(createArray(1, 2, 3), createArray(3, 4, 5))
// Returns [1, 2, 3, 4, 5]To work with conditions, compare values and expression results, or evaluate various kinds of logic, you can use these logical comparison functions.
and(equals(1, 1), equals(2, 2))
// Returns trueequals(10, 10)
// Returns true
equals(true, 1)
// Returns true
equals('abc', 'abcd')
// Returns falsegreater(10, 5)
// Returns truegreaterOrEquals(5, 5)
// Returns trueif(equals(1, 1), 'yes', 'no')
// Returns 'yes'less(5, 10)
// Returns truelessOrEquals(5, 5)
// Returns truenot(equals(1, 2))
// Returns trueor(equals(1, 2), equals(2, 2))
// Returns truestrongEquals(1, 1.0)
// Returns trueTo change a value's type or format, you can use these conversion functions.
array('hello')
// Returns ['hello']base64('hello')
// Returns 'aGVsbG8='base64ToBinary('aGVsbG8=')
// Returns the binary for 'hello'base64ToJson('eyJuYW1lIjoiQW5uIn0=')
// Returns {"name": "Ann"}base64ToString('aGVsbG8=')
// Returns 'hello'binary('hello')
// Returns the binary version of 'hello'bool(1)
// Returns true
bool('false')
// Returns falsecreateArray('a', 'b', 'c')
// Returns ['a', 'b', 'c']dataUri('hello')
// Returns 'data:text/plain;charset=utf-8;base64,aGVsbG8='dataUriToBinary('data:text/plain;charset=utf-8;base64,aGVsbG8=')
// Returns the binary for 'hello'dataUriToString('data:text/plain;charset=utf-8;base64,aGVsbG8=')
// Returns 'hello'decimal('1.2345678912312131')
// Returns 1.234567891231213
string(decimal('1.2345678912312131'))
// Returns '1.2345678912312131'decodeBase64('aGVsbG8=')
// Returns 'hello'decodeDataUri('data:text/plain;charset=utf-8;base64,aGVsbG8=')
// Returns the binary for 'hello'decodeUriComponent('https%3A%2F%2Fcontoso.com')
// Returns 'https://contoso.com'encodeBase64('hello')
// Returns 'aGVsbG8='encodeUriComponent('https://contoso.com')
// Returns 'https%3A%2F%2Fcontoso.com'float('10.333')
// Returns 10.333int('10')
// Returns 10json('{"fullName": "Sophia Owen"}')
// Returns {"fullName": "Sophia Owen"}
json(xml('<?xml version="1.0"?><root><a>1</a></root>'))// Deprecated - use json() or the Parse JSON action insteadstring(10)
// Returns '10'
string({ "name": "Sophie Owen" })
// Returns '{ \"name\": \"Sophie Owen\" }' (the quotation marks are escaped)uriComponent('https://contoso.com')
// Returns 'https%3A%2F%2Fcontoso.com'uriComponentToBinary('https%3A%2F%2Fcontoso.com')
// Returns the binary for the decoded stringuriComponentToString('https%3A%2F%2Fcontoso.com')
// Returns 'https://contoso.com'xml(json('{"name": "Sophia"}'))
// Returns '<name>Sophia</name>'To work with integers and floats, you can use these math functions.
add(1, 1.5)
// Returns 2.5div(10, 5)
// Returns 2max(1, 3, 2)
// Returns 3
max(createArray(1, 3, 2))
// Returns 3min(1, 3, 2)
// Returns 1mod(7, 3)
// Returns 1mul(3, 4)
// Returns 12pow(2, 10)
// Returns 1024.0rand(1, 5)
// Returns 1, 2, 3 or 4range(1, 4)
// Returns [1, 2, 3, 4]sub(10, 3)
// Returns 7To work with dates and times, you can use these date and time functions.
addDays('2025-03-15T00:00:00Z', 5)
// Returns '2025-03-20T00:00:00.0000000Z'addHours('2025-03-15T00:00:00Z', 5)
// Returns '2025-03-15T05:00:00.0000000Z'addMinutes('2025-03-15T00:00:00Z', 30)
// Returns '2025-03-15T00:30:00.0000000Z'addSeconds('2025-03-15T00:00:00Z', 10)
// Returns '2025-03-15T00:00:10.0000000Z'addToTime('2025-03-15T00:00:00Z', 2, 'Week')
// Returns '2025-03-29T00:00:00.0000000Z'convertFromUtc('2025-03-15T12:00:00Z', 'Pacific Standard Time')
// Returns '2025-03-15T05:00:00.0000000'convertTimeZone('2025-03-15T12:00:00Z', 'UTC', 'GMT Standard Time')
// Returns '2025-03-15T12:00:00.0000000'convertToUtc('2025-03-15T05:00:00', 'Pacific Standard Time')
// Returns '2025-03-15T12:00:00.0000000Z'dateDifference('2025-03-15', '2025-03-20')
// Returns '5.00:00:00'dayOfMonth('2025-03-15T13:27:36Z')
// Returns 15dayOfWeek('2025-03-15T13:27:36Z')
// Returns 6dayOfYear('2025-03-15T13:27:36Z')
// Returns 74formatDateTime('2025-03-15T13:27:36Z', 'dd/MM/yyyy')
// Returns '15/03/2025'formatTimeSpan('4.20:00:00', '%d')
// Returns '4'
formatTimeSpan('1:00:00.11', 'g', 'de-DE')
// Returns '1:00:00,11'getFutureTime(5, 'Day')
// Returns the timestamp 5 days from nowgetPastTime(5, 'Day')
// Returns the timestamp 5 days agoparseDateTime('20/10/2014', 'fr-fr')
// Returns '2014-10-20T00:00:00.0000000'
parseDateTime('21052019', 'fr-fr', 'ddMMyyyy')
// Returns '2019-05-21T00:00:00.0000000'startOfDay('2025-03-15T13:27:36Z')
// Returns '2025-03-15T00:00:00.0000000Z'startOfHour('2025-03-15T13:27:36Z')
// Returns '2025-03-15T13:00:00.0000000Z'startOfMonth('2025-03-15T13:27:36Z')
// Returns '2025-03-01T00:00:00.0000000Z'subtractFromTime('2025-03-15T00:00:00Z', 1, 'Week')
// Returns '2025-03-08T00:00:00.0000000Z'ticks('2025-03-15T00:00:00Z')
// Returns 638775936000000000utcNow()
// Returns e.g. '2025-03-15T13:27:36.0000000Z'
utcNow('yyyy-MM-dd')
// Returns e.g. '2025-03-15'Access workflow runtime details, inputs, triggers, and action outputs.
action()['outputs']
// Returns the current action's outputsactions('Get_items')['outputs']['body']
// Returns the output body of the action 'Get_items'body('Get_items')?['value']
// Returns the value array from the action's bodyformDataMultiValues('Send_form', 'tag')
// Returns an array of all 'tag' valuesformDataValue('Send_form', 'name')
// Returns the value of 'name'items('Apply_to_each')?['Title']
// Returns the current item's TitleiterationIndexes('Do_until')
// Returns the current loop iteration indexlistCallbackUrl()
// Returns the callback URL of the trigger or webhook actionmultipartBody('Http', 0)
// Returns the body of the first partoutputs('Compose')
// Returns the output of the action 'Compose'parameters('siteUrl')
// Returns the value of the flow parameter 'siteUrl'result('Scope')
// Returns inputs and outputs of each action in the Scopetrigger()['outputs']
// Returns the trigger's outputstriggerBody()?['email']
// Returns the 'email' property of the trigger bodytriggerFormDataValue('name')
// Returns the value of 'name' in the trigger form datatriggerMultipartBody(0)
// Returns the body of the trigger's first parttriggerFormDataMultiValues('tag')
// Returns an array of all 'tag' valuestriggerOutputs()?['headers']
// Returns the trigger's headersvariables('counter')
// Returns the current value of the variable 'counter'workflow()['run']['name']
// Returns the current run IDTo work with uniform resource identifiers (URIs) and get various property values for these URIs, you can use these URI parsing functions.
uriHost('https://www.contoso.com/path?x=1')
// Returns 'www.contoso.com'uriPath('https://www.contoso.com/path?x=1')
// Returns '/path'uriPathAndQuery('https://www.contoso.com/path?x=1')
// Returns '/path?x=1'uriPort('https://www.contoso.com:8080/path')
// Returns 8080uriQuery('https://www.contoso.com/path?x=1')
// Returns '?x=1'uriScheme('https://www.contoso.com/path')
// Returns 'https'To work with JSON objects and XML nodes, you can use these manipulation functions.
addProperty(json('{"a": 1}'), 'b', 2)
// Returns {"a": 1, "b": 2}coalesce(null, null, 'fallback')
// Returns 'fallback'decodeXmlName('data_x002F_value')
// Returns 'data/value'decodeXmlValue('<value>')
// Returns '<value>'encodeXmlName('data/value')
// Returns 'data_x002F_value'encodeXmlValue('<value>')
// Returns '<value>'mergeObjects(json('{"a": 1}'), json('{"b": 2}'))
// Returns {"a": 1, "b": 2}removeProperty(json('{"a": 1, "b": 2}'), 'b')
// Returns {"a": 1}setProperty(json('{"a": 1}'), 'a', 5)
// Returns {"a": 5}xpath(xml(parameters('items')), '/produce/item/name/text()')
// Returns ['Gala', 'Honeycrisp'] for the items XML in the reference
xpath(xml(parameters('items')), 'sum(/produce/item/count)')
// Returns 30Expression functions are built-in formulas used in Power Automate and Azure Logic Apps to transform text, work with dates and numbers, handle collections, and evaluate conditions. Examples include concat(), formatDateTime(), and if().
In an action field, open the Expression tab, enter the function with its arguments, and select Add. Use this explorer to find a function and review its example before adding it to your flow.
Use formatDateTime() with a timestamp and a format string. For example, formatDateTime(utcNow(), 'yyyy-MM-dd') returns the current UTC date in year-month-day format. Apply any required time-zone conversion before formatting.
Use trim() to remove whitespace from the beginning and end of a string, for example trim(' hello ') returns 'hello'.
Search or browse this reference, then select a function to see its purpose, an expression example, and implementation details. Use the Microsoft Expressions Guide link for the official documentation.