Functions let you work with static or dynamic variables in more advanced ways. They allow you to manipulate or modify dynamic variables by applying functions to them, making them especially useful for creating more complex workflows.
To apply functions to a dynamic variable or a static variable you must wrap the chosen function in the double curly brackets syntax: {{}}
, as seen in the following example.
In the following example we are using the decode_base_64(s)
string manipulation function to decode a Base64-encoded string (a static variable) and return the original decoded string.
You can also use Utility Actions to apply specific function logic to dynamic variables throughout the workflow.
Function | Description |
---|---|
split(s, sep) | Slices s into all substrings separated by sep and returns a slice of the substrings between those separators. |
trim(s, cutset) | Returns a slice of the string s with all leading and trailing Unicode code points contained in cutset removed. |
trim_space(s) | Returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode. |
trim_prefix(s) | Returns s without the provided leading prefix string. If s doesn’t start with prefix, s is returned unchanged. |
trim_suffix(s) | Returns s without the provided trailing suffix string. If s doesn’t end with suffix, s is returned unchanged. |
str(input) | Converts an input to a string value. |
max_str(input) | Receives a list of strings and returns the largest one (by lexicographical order.) |
max_num(input) | Receives a list of numbers and returns the largest one. |
query_escape(input) | Escapes the given string into URL query encoding. Example: query_escape("hello world!") -> "hello-world%21 |
query_unescape(input) | Decodes the given URL query encoded string. Example: query_unescape("hello-world%21") -> "hello world!" |
encode_base_64(input) | Encodes any input value to a Base64-encoded string. |
decode_base_64(s) | Decodes a Base64-encoded string and returns the original decoded string. |
is_uuid(input) | Checks if the input string is a valid UUID. Returns true if it’s a valid UUID format, false otherwise. |
Function | Description |
---|---|
table_to_csv(input) | Produces CSV output from a table format step output. |
table_to_ascii(input) | Produces ASCII table output from a table format step output. |
table_to_html(input) | Produces HTML table output from table step output. |
prettify_json(input) | Format a JSON with human-readable spacing. |
Function | Description |
---|---|
reverse(arr) | Returns an array in reverse order of its indices. |
empty(arr) | Checks whether an array or string is empty. |
not_empty(arr) | Checks whether an array or string is not empty. |
Function | Description |
---|---|
random_uuid() | Returns a randomly generated UUID. For example b27c9b25-7af4-4f63-a7e0-46bfe92dd156 |
random(num1,num2) | Returns a randomly generated number between two values. For example random(1,7) -> 4 |
Please note that the following date & time formats are accepted.
1725916800
1725916800000
2006-01-02T15:04:05Z07:00
2006-01-02T15:04:05Z0700
2006-01-02T15:04:05.999999999Z07:00
The default date format is dates in UTC timezone in RFC3339 format.
Function | Description |
---|---|
now() | Returns the current time in timestamp format. Example output: 2022-07-28T15:02:26Z . |
now_unix() | Returns the elapsed epoch current time. Example output: 1659020794 . |
now_unix_mili() | Returns the elapsed epoch current time in milliseconds format. Example output: 1659020794000 . |
max_date(input) | MaxDate receives a list of dates and returns the most recent one. |
To add and subtract time interval from another time use + and -
Supported intervals:
Note Day, Month and Year are not supported because they have variable lengths.
Use to_date
to transform date string representation or date represented as Epoch time (seconds since 1970-01-01) into date. This enables performing date operations on the date such as +/-.
Transforms the date string into Epoch time (seconds since 1970-01-01). Also works with input which is already an Epoch, in which case it returns the input as is.
Transforms the date string into Epoch Milliseconds time (seconds since 1970-01-01). Also works with input which is already an Epoch Milliseconds, in which case it returns the input as is.
Format the date as local time in a given time zone. Accepts dates as Epoch time or string in RFC3339 format.
Format the date in user requested format. Inputs are: