Expression helpers Stay organized with collections Save and categorize content based on your preferences.
In addition to thestandard library modules,Workflows supports a number of other built-in helper functionssuch as for data type and format conversions.
For examples, see theSyntax cheat sheet.
Conversion functions
Convert values from one data type to another.
| Functions | |
|---|---|
double() | Accepts an attribute of type string or integer and returns a double. |
int() | Accepts an attribute of type string or double and returns an integer. |
string() | Accepts an attribute of type integer, double, or boolean and returns a string. |
Data type functions
Operate on lists, maps, and strings.
| Functions | |
|---|---|
in() | Checks whether a given key is present in a list or map. SeeCheck existence of a key in a list orCheck existence of a key in a map. |
keys() | Accepts an attribute of type map and returns a list of key elements in the map. |
len() | Computes the length of a value according to its type. Accepts an attribute of type list, map, or string and returns an integer.
|
Conditional functions
Support conditions within expressions.
| Functions | |
|---|---|
default(val, defaultVal) | Returns a value if it is not null; otherwise returns a default value.
You can use You can also use |
if(condition, ifTrue, ifFalse) | Evaluates a condition and returns one of two arguments depending on what the condition evaluates to.
Note that arguments passed to |
Type functions
Return data type.
| Functions | |
|---|---|
get_type(arg) | Returns a string indicating the data type of If the operand is a function or a subworkflow, a |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.