String functions
To work with strings, you can use these string functions and also some collection functions. String functions work only on strings.
- chunk: Split a string or collection into chunks of equal length.
- concat: Combine two or more strings, and return the combined string.
- endsWith: Check whether a string ends with the specified substring.
- formatNumber: Return a number as a string based on the specified format
- guid: Generate a globally unique identifier (GUID) as a string.
- indexOf: Return the starting position for a substring.
- isFloat: Return a boolean that indicates whether a string is a floating-point number.
- isInt: Return a boolean that indicates whether a string is an integer.
- lastIndexOf: Return the starting position for the last occurrence of a substring.
- length: Return the number of items in a string or array.
- nthIndexOf: Return the starting position or index value where the nth occurrence of a substring appears in a string.
- replace: Replace a substring with the specified string, and return the updated string.
- slice: Return a substring by specifying the starting and ending position or value. See also substring.
- split: Return an array that contains substrings, separated by commas, from a larger string based on a specified delimiter character in the original string.
- startsWith: Check whether a string starts with a specific substring.
- substring: Return characters from a string, starting from the specified position. See also slice.
- toLower: Return a string in lowercase format.
- toUpper: Return a string in uppercase format.
- trim: Remove leading and trailing whitespace from a string, and return the updated string.
- trimByteOrderMark: Remove a byte order mark from the beginning of a string or binary content.
Collection functions
To work with collections, generally arrays, strings, and sometimes, dictionaries, you can use these collection functions.
- contains: Check whether a collection has a specific item.
- empty: Check whether a collection is empty.
- first: Return the first item from a collection.
- intersection: Return a collection that has only the common items across the specified collections.
- item: If this function appears inside a repeating action over an array, return the current item in the array during the action's current iteration.
- join: Return a string that has all the items from an array, separated by the specified character.
- last: Return the last item from a collection.
- reverse: Reverse the order of items in an array.
- skip: Remove items from the front of a collection, and return all the other items.
- sort: Sort items in a collection.
- take: Return items from the front of a collection.
- union: Return a collection that has all the items from the specified collections.
Logical comparison functions
To work with conditions, compare values and expression results, or evaluate various kinds of logic, you can use these logical comparison functions.
- and: Check whether all expressions are true.
- equals: Check whether both values are equivalent.
- greater: Check whether the first value is greater than the second value.
- greaterOrEquals: Check whether the first value is greater than or equal to the second value.
- if: Check whether an expression is true or false. Based on the result, return a specified value.
- less: Check whether the first value is less than the second value.
- lessOrEquals: Check whether the first value is less than or equal to the second value.
- not: Check whether an expression is false.
- or: Check whether at least one expression is true.
- strongEquals: Check whether values of the same type are equivalen
Conversion functions
To change a value's type or format, you can use these conversion functions.
- array: Return an array from a single specified input. For multiple inputs, see createArray.
- base64: Return the base64-encoded version for a string.
- base64ToBinary: Return the binary version for a base64-encoded string.
- base64ToJson: Return the JSON value for a base64-encoded string.
- base64ToString: Return the string version for a base64-encoded string.
- binary: Return the binary version for an input value.
- bool: Return the Boolean version for an input value.
- createArray: Return an array from multiple inputs.
- dataUri: Return the data URI for an input value.
- dataUriToBinary: Return the binary version for a data URI.
- dataUriToString: Return the string version for a data URI.
- decimal: Return the decimal number for a decimal string.
- decodeBase64: Return the string version for a base64-encoded string.
- decodeDataUri: Return the binary version for a data URI.
- decodeUriComponent: Return a string that replaces escape characters with decoded versions.
- encodeBase64: Return the base64-encoded version for a string.
- encodeUriComponent: Return a string that replaces URL-unsafe characters with escape characters.
- float: Return a floating point number for an input value.
- int: Return the integer version for a string.
- json: Return the JavaScript Object Notation (JSON) type value or object for a string or XML.
- parse (deprecated): Return the JSON value or object for a string or XML.
- string: Return the string version for an input value.
- uriComponent: Return the URI-encoded version for an input value by replacing URL-unsafe characters with escape characters.
- uriComponentToBinary: Return the binary version for a URI-encoded string.
- uriComponentToString: Return the string version for a URI-encoded string.
- xml: Return the XML version for a string.
Math functions
To work with integers and floats, you can use these math functions.
- add: Return the result from adding two numbers.
- div: Return the result from dividing two numbers.
- max: Return the highest value from a set of numbers or an array.
- min: Return the lowest value from a set of numbers or an array.
- mod: Return the remainder from dividing two numbers.
- mul: Return the product from multiplying two numbers.
- pow: Return a number raised to a specified power.
- rand: Return a random integer from a specified range.
- range: Return an integer array that starts from a specified integer.
- sub: Return the result from subtracting the second number from the first number.
Date and time functions
To work with dates and times, you can use these date and time functions.
- addDays: Add days to a timestamp.
- addHours: Add hours to a timestamp.
- addMinutes: Add minutes to a timestamp.
- addSeconds: Add seconds to a timestamp.
- addToTime: Add specified time units to a timestamp. See also getFutureTime.
- convertFromUtc: Convert a timestamp from Universal Time Coordinated (UTC) to the target time zone.
- convertTimeZone: Convert a timestamp from the source time zone to the target time zone.
- convertToUtc: Convert a timestamp from the source time zone to Universal Time Coordinated (UTC).
- dateDifference: Return the difference between two dates as a timespan.
- dayOfMonth: Return the day of the month component from a timestamp.
- dayOfWeek: Return the day of the week component from a timestamp.
- dayOfYear: Return the day of the year component from a timestamp.
- formatDateTime: Return the date from a timestamp.
- formatTimeSpan: Return a time span in the specified format.
- getFutureTime: Return the current timestamp plus the specified time units. See also addToTime.
- getPastTime: Return the current timestamp minus the specified time units. See also subtractFromTime.
- parseDateTime: Return the timestamp from a string that contains a timestamp.
- startOfDay: Return the start of the day for a timestamp.
- startOfHour: Return the start of the hour for a timestamp.
- startOfMonth: Return the start of the month for a timestamp.
- subtractFromTime: Subtract a number of time units from a timestamp. See also getPastTime.
- ticks: Return the ticks property value for a specified timestamp.
- utcNow: Return the current timestamp as a string.
Workflow functions
Access workflow runtime details, inputs, triggers, and action outputs.
- action: Return the current action's output at runtime, or values from other JSON name-and-value pairs. See also actions.
- actions: Return an action's output at runtime, or values from other JSON name-and-value pairs. See also action.
- body: Return an action's body output at runtime.
- formDataMultiValues: Create an array with the values that match a key name in form-data or form-encoded action outputs.
- formDataValue: Return a single value that matches a key name in an action's form-data or form-encoded output.
- items: If this function appears inside a Foreach or Until loop, return the current item from the specified loop.
- iterationIndexes: If this function appears inside an Until loop, return the index value for the current iteration. You can use this function inside nested Until loops.
- listCallbackUrl: Return the "callback URL" that calls a trigger or action.
- multipartBody: Return the body for a specific part in an action's output that has multiple parts.
- outputs: Return an action's output at runtime.
- parameters: Return the value for a parameter that is described in your workflow definition.
- result: Return the inputs and outputs from the top-level actions inside the specified scoped action, such as For_each, Until, and Scope.
- trigger: Return a trigger's output at runtime, or from other JSON name-and-value pairs. See also triggerOutputs and triggerBody.
- triggerBody: Return a trigger's body output at runtime. See trigger.
- triggerFormDataValue: Return a single value matching a key name in form-data or form-encoded trigger outputs.
- triggerMultipartBody: Return the body for a specific part in a trigger's multipart output.
- triggerFormDataMultiValues: Create an array whose values match a key name in form-data or form-encoded trigger outputs.
- triggerOutputs: Return a trigger's output at runtime, or values from other JSON name-and-value pairs. See trigger.
- variables: Return the value for a specified variable.
- workflow: Return all the details about the workflow itself during run time.
URI parsing functions
To work with uniform resource identifiers (URIs) and get various property values for these URIs, you can use these URI parsing functions.
- uriHost: Return the host value for a uniform resource identifier (URI).
- uriPath: Return the path value for a uniform resource identifier (URI).
- uriPathAndQuery: Return the path and query values for a uniform resource identifier (URI).
- uriPort: Return the port value for a uniform resource identifier (URI).
- uriQuery: Return the query value for a uniform resource identifier (URI).
- uriScheme: Return the scheme value for a uniform resource identifier (URI)
Manipulation functions: JSON & XML
To work with JSON objects and XML nodes, you can use these manipulation functions.
- addProperty: Add a property and its value, or name-value pair, to a JSON object, and return the updated object.
- coalesce: Return the first non-null value from one or more parameters.
- decodeXmlName: Decode an XML element name.
- decodeXmlValue: Decode an XML element value.
- encodeXmlName: Encode a string as an XML element name.
- encodeXmlValue: Encode a string as an XML element value.
- mergeObjects: Merge two JSON objects.
- removeProperty: Remove a property from a JSON object and return the updated object.
- setProperty: Set the value for a JSON object's property and return the updated object.
- xpath: Check XML for nodes or values that match an XPath (XML Path Language) expression, and return the matching nodes or values.