Functions

FunctionArgumentsDescription
capitalize(x: str) -> strCapitalize a string.
concat(*items: str) -> strConcatenate multiple strings.
endswith(x: str, suffix: str) -> boolCheck if a string ends with a specified suffix.
format(template: str, *values: Any) -> strFormat a string with the given arguments.
join(items: Sequence[str], sep: str) -> strJoin sequence of strings with separator.
lowercase(x: str) -> strConvert string to lowercase.
prefix(x: str | list[str], prefix: str) -> str | list[str]Add a prefix to a string or list of strings.
replace(x: str, old: str, new: str) -> strReplace all occurrences of old substring with new substring.
slice(x: str, start_index: int, length: int) -> strExtract a substring from start_index with given length.
slugify(x: str) -> strSlugify a string.
split(x: str, sep: str) -> list[str]Split a string into a list of strings by a seperator.
startswith(x: str, suffix: str) -> boolCheck if a string starts wit a specified suffix.
strip(x: str, chars: str) -> strRemoves all leading and trailing characters.
suffix(x: str | list[str], suffix: str) -> str | list[str]Add a suffix to a string or list of strings.
titleize(x: str) -> strConvert a string to titlecase.
uppercase(x: str) -> strConvert string to uppercase.
url_encode(x: str) -> strConverts URL-unsafe characters into percent-encoded characters.
url_decode(x: str) -> strConverts percent-encoded characters back into their original form.
greater_than_or_equal(a: Any, b: Any) -> boolCheck if a is greater than or equal to b.
greater_than(a: Any, b: Any) -> boolCheck if a is greater than b.
is_equal(a: Any, b: Any) -> boolCheck if a is equal to b.
is_null(x: Any) -> boolCheck if value is None.
less_than_or_equal(a: Any, b: Any) -> boolCheck if a is less than or equal to b.
less_than(a: Any, b: Any) -> boolCheck if a is less than b.
not_equal(a: Any, b: Any) -> boolCheck if a is not equal to b.
not_null(x: Any) -> boolCheck if value is not None.
regex_extract(pattern: str, text: str) -> str | NoneExtract first match of regex pattern from text.
regex_match(pattern: str, text: str) -> boolCheck if text matches regex pattern.
regex_not_match(pattern: str, text: str) -> boolCheck if text does not match regex pattern.
compact(x: list[Any]) -> list[Any]Drop null values from a list. Similar to compact function in Terraform.
contains(item: Any, container: Sequence[Any]) -> boolCheck if item exists in container.
does_not_contain(item: Any, container: Sequence[Any]) -> boolCheck if item does not exist in container.
flatten(iterables: Sequence[Sequence[Any]]) -> list[Any]Flatten nested sequences into a single list.
is_empty(x: Sequence[Any]) -> boolCheck if sequence is empty.
is_in(item: Any, container: Sequence[Any]) -> boolCheck if item exists in container.
length(obj, /)Return the number of items in a container.
not_empty(x: Sequence[Any]) -> boolCheck if sequence is not empty.
not_in(item: Any, container: Sequence[Any]) -> boolCheck if item does not exist in container.
unique(items: Sequence[Any]) -> list[Any]List of hashable items (e.g. strings, numbers) to remove duplicates from.
add(a: float | int, b: float | int) -> float | intAdd two numbers together.
sub(a: float | int, b: float | int) -> float | intSubtract second number from first number.
mul(a: float | int, b: float | int) -> float | intMultiply two numbers together.
div(a: float | int, b: float | int) -> floatDivide first number by second number.
mod(a: float | int, b: float | int) -> float | intCalculate modulo (remainder) of first number divided by second.
pow(a: float | int, b: float | int) -> float | intRaise first number to the power of second number.
sum(iterable: Iterable[float | int], start: float | int = 0) -> float | intReturn the sum of a ‘start’ value (default: 0) plus an iterable of numbers.
zip(*iterables: Sequence[Any]) -> list[tuple[Any, …]]Zip multiple sequences together.
iter_product(*iterables: Sequence[Any]) -> list[tuple[Any, …]]Generate cartesian product of sequences.
range(start: int, end: int, step: int = 1) -> rangeCreate a range of integers from start to end (exclusive), with a step size.
uuid4() -> strGenerate a random UUID string.
index_by_key(x: list[dict[str, Any]], field_key: str, value_key: str | None = None) -> dict[str, Any]Convert a list of objects into an object indexed by the specified key.
lookup(d: dict[Any, Any], k: Any) -> AnySafely get value from an object.
map_keys(x: dict[str, Any], keys: dict[str, str]) -> dict[str, Any]Map keys in an object to new keys.
merge(x: list[dict[Any, Any]]) -> dict[Any, Any]Merge list of objects. Similar to merge function in Terraform.
to_keys(x: dict[Any, Any]) -> list[Any]Extract keys from an object.
to_values(x: dict[Any, Any]) -> list[Any]Extract values from an object.
tabulate(x: list[dict[str, typing.Any]], format: Literal[markdown, html, csv, xml]) -> strFormat list of objects into markdown, html, csv, or xml
and(a: bool, b: bool) -> boolLogical AND operation.
or(a: bool, b: bool) -> boolLogical OR operation.
not(x: bool) -> boolLogical NOT operation.
serialize_json(x: Any) -> strConvert object to JSON string.
deserialize_json(obj, /)Deserialize JSON to Python objects.
prettify_json(x: Any) -> strConvert object to formatted JSON string.
deserialize_ndjson(x: str) -> list[dict[str, Any]]Parse newline-delimited JSON string into list of objects.
extract_text_from_html(input: str) -> list[str]Extract text content from HTML string using HTMLToTextParser.
datetime(year: int, month: int, day: int, hour: int = 0, minute: int = 0, second: int = 0) -> datetimeCreate datetime from year, month, day, hour, minute, and second.
days_between(start: datetime | str, end: datetime | str) -> floatDays between two datetimes.
days(x: int) -> timedeltaCreate timedelta with specified days.
format_datetime(x: datetime | str, format: str) -> strFormat datetime into specified format (e.g. ‘%Y-%m-%d %H:%M:%S’).
from_timestamp(x: int, unit: str = s) -> datetimeConvert integer timestamp in milliseconds (‘ms’) or seconds (‘s’) to datetime.
get_day_of_week(x: datetime | str, format: “Literal[number, full, short]” = number) -> int | strExtract day of week from datetime. Returns 0-6 (Mon-Sun) or day name if format is “full” or “short”.
get_day(x: datetime | str) -> intGet day of month (1-31) from datetime.
get_hour(x: datetime | str) -> intGet hour (0-23) from datetime.
get_minute(x: datetime | str) -> intGet minute (0-59) from datetime.
get_month(x: datetime | str, format: “Literal[number, full, short]” = number) -> int | strExtract month from datetime. Returns 1-12 or month name if format is “full” or “short”.
get_second(x: datetime | str) -> intGet second (0-59) from datetime.
get_year(x: datetime | str) -> intGet year from datetime.
hours_between(start: datetime | str, end: datetime | str) -> floatHours between two datetimes.
hours(x: int) -> timedeltaCreate timedelta with specified hours.
minutes_between(start: datetime | str, end: datetime | str) -> floatMinutes between two datetimes.
minutes(x: int) -> timedeltaCreate timedelta with specified minutes.
now() -> datetimeReturn the current datetime.
parse_datetime(x: str, format: str) -> datetimeParse string to datetime using specified format.
seconds_between(start: datetime | str, end: datetime | str) -> floatSeconds between two datetimes.
seconds(x: int) -> timedeltaCreate timedelta with specified seconds.
set_timezone(x: datetime | str, timezone: str) -> datetimeConvert datetime to different timezone. Timezone must be a valid IANA timezone name (e.g., “America/New_York”).
to_datetime(x: Any, timezone: str | None = None) -> datetimeConvert to timezone-aware datetime object from timestamp (in seconds), ISO 8601 string or existing datetime.
to_isoformat(x: datetime | str) -> strConvert datetime to ISO format string.
to_timestamp(x: datetime | str, unit: str = s) -> intConvert datetime to timestamp in milliseconds (‘ms’) or seconds (‘s’).
today() -> dateReturn the current date.
unset_timezone(x: datetime | str) -> datetimeRemove timezone information from datetime without changing the time.
utcnow() -> datetimeReturn the current timezone-aware datetime.
weeks_between(start: datetime | str, end: datetime | str) -> floatWeeks between two datetimes or dates.
weeks(x: int) -> timedeltaCreate timedelta with spcified weeks
windows_filetime(x: datetime | str) -> intConvert datetime to Windows filetime.
to_base64(x: str) -> strEncode string to base64.
from_base64(x: str) -> strDecode base64 string to string.
to_base64url(x: str) -> strEncode string to URL-safe base64.
from_base64url(x: str) -> strDecode URL-safe base64 string to string.
ipv4_in_subnet(ipv4: str, subnet: str) -> boolCheck if IPv4 address is in the given subnet.
ipv6_in_subnet(ipv6: str, subnet: str) -> boolCheck if IPv6 address is in the given subnet.
ipv4_is_public(ipv4: str) -> boolCheck if IPv4 address is public/global.
ipv6_is_public(ipv6: str) -> boolCheck if IPv6 address is public/global.
check_ip_version(ip: str) -> intGet IP address version (4 or 6).
get_interaction() -> dict[str, str] | NoneGet the interaction context from the current action in the workflow execution.
extract_emails(text: str, normalize: bool = False) -> list[str]Extract unique emails from a string.
extract_ipv4(text: str, include_defanged: bool = False) -> list[str]Extract unique IPv4 addresses from a string.

Operators

OperatorDescription
||Logical OR operation.
&&Logical AND operation.
==Check if a is equal to b.
!=Check if a is not equal to b.
<Check if a is less than b.
<=Check if a is less than or equal to b.
>Check if a is greater than b.
>=Check if a is greater than or equal to b.
+Add two numbers together.
-Subtract second number from first number.
*Multiply two numbers together.
/Divide first number by second number.
%Calculate modulo (remainder) of first number divided by second.
inCheck if item exists in container.
not inCheck if item does not exist in container.
is-
is not-

Was this page helpful?