Skip to main content

Workflow Engine Functions

Date-Time Functions

FunctionDescription
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.

String Manipulation Functions

FunctionDescription
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.

Table Manipulation Functions

FunctionDescription
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.

Array Functions

FunctionDescription
reverse(arr)Returns an array in reverse order of it's indices.
empty(arr)Checks whether an array or string is empty.
not_empty(arr)Checks whether an array or string is not empty.

Generator Functions

FunctionDescription
random_uuid()Returns a randomly generated UUID.
For example b27c9b25-7af4-4f63-a7e0-46bfe92dd156
random(num1,num2)Returns a randomly generated number inclusively between two values.
For example random(1,7) -> 4