toArray(value) | Converts value to an array. | {{ functions.toArray('abc') }} // ['abc'] |
toBoolean(value) | Converts value to a boolean value. | {{ functions.toBoolean(1) }} // true<br /><br />\{\{ functions.toBoolean(0) }} // false |
length(value) | Returns the length of the parameter value. | {{ functions.length('auth0') }} // 5 |
mask(value) | Masks a value to avoid be exposed in Executions. | {{ functions.mask('my_awesome_secret') }} // ███ |
toNumber(value) | Converts value to a number. | {{ functions.toNumber('123') }} // 123 |
random(min, max, [boolean]) | Returns a random number between the inclusive min and max. | {{ functions.random(0, 6) }} // 4 <br /><br />\{\{ functions.random(0, 6, true) }} // 3.8523497... |
slice(value, start, end) | Returns a section of a value array or string between the start and end indexes. | {{ functions.slice( 'example', 3, 5) }} // 'mp' |
toString(value) | Converts value to a string. | {{ functions.toString(123) }} // '123' |
substring(value, start, end) | Returns a section of a value between the start and end indexes. Read about the differences of slice and substring functions | {{ functions.substring( 'example’', 3, 5) }} // 'mp' |
toTimestamp() | Returns the current UNIX timestamp. | {{ functions.toTimestamp() }} // 1628761483 |
toTimestamp(date) | Returns the provided date in UNIX time. | {{ functions.toTimestamp('2021-04-30T10:02:50.876Z') }} // 1619776970 |
toTimestamp(date) | Returns the provided date in UNIX time. | {{ functions.toTimestamp('2021-04-30T10:02:50.876Z') }} // 1619776970 |
replaceAll(value, string, replacement) | Returns a new string with all matches of a pattern replaced by a replacement. | {{ functions.replaceAll('2021-04-30', '-', '/') }} // 2021/04/30 |
replace(value, string, replacement) | Returns a new string with all matches of a pattern replaced by a replacement. If pattern is a string, only the first occurence will be replaced. | {{ functions.replace('2021-04-30', '-', '/') }} // 2021/04-30 |
split(value, separator, limit?) | Returns an ordered list of substrings divided by the separator. | {{ functions.split('2021-04-30', '-') }} // ['2021', '04', '30'] |
now() | Returns the current date in ISO 8601 format. | {{ functions.now() }} // 2021-04-30T10:31:28.576Z |
includes(collection, item, fromIndex?) | Returns whether an array includes a certain value among its entries. | {{ functions.includes(['auth0', 'identity', 'authentication'], 'identity') }} // true |
indexOf(collection, item, fromIndex?) | Returns the first index at which a given element can be found in the array, or -1 if it is not present. | {{ functions.indexOf(['auth0', 'identity', 'authentication'], 'identity') }} // 1 |
merge(base, value) | Returns a merged array, object or concatenates a string depending on the base data type. | {{ functions.merge(['auth0', 'identity'], ['authentication']) }} // ['auth0', 'identity', 'authentication'] |
md5(value) | Returns a MD5 hashed value. | {{ functions.md5('auth0') }} // 7bbb597... |
sha1(value) | Returns a SHA1 hashed value. | {{ functions.sha1('auth0') }} // b4ec5339... |
sha256(value) | Returns a SHA256 hashed value. | {{ functions.sha256('auth0') }} // d9082bdc... |
sha512(value) | Returns a SHA512 hashed value. | {{ functions.sha512('auth0') }} // c0d588069d... |
uuid() | Returns a random v4 UUID. | {{ functions.uuid() }} // 36b8f84d-df4e-4d49-b662-bcde71a8764 |