Deny by default
The Code Step validator rejects any function or method call that is not on the allow-list below. Validation runs before execution, so disallowed calls never run.Built-in Functions
print(...) writes a user-facing system note for Code Step diagnostics. It supports multiple values plus sep and end; multi-line output is split into separate system notes. range accepts range(stop), range(start, stop), and range(start, stop, step).
Allowed Methods
get is allow-listed for dictionary-style values, and append is allow-listed for list-building.
Flow Helpers
coalesce(value, default)— returnsdefaultwhenvalueisNoneor""is_empty(value)— true forNone,"",[], or{}is_not_empty(value)— the inverse ofis_emptymap_value(key, mapping, default)— lowercases and strips string keys before lookup
Type Helpers
is_number returns true for int or float, but false for bool.
Object and Path Helpers
{{...}} placeholder syntax for normal variable access. Use these helpers when working with dynamic dictionaries inside the code.
commit_contact_timezone(iana, state, city)— validates an Australian IANA timezone, updates the current contact’stimezoneandlocation, refreshes runtime calendar timezone state, and writes the canonical{{contact.*}}and{{timezone.*}}result variables. With no arguments it reads{{timezone.resolved_iana}},{{timezone.resolved_state}}, and{{timezone.resolved_city}}.commit_composite_outputs()— inside a sub-flow, commits declared parent composite output variables before the sub-flow returns, and returns the sorted output ids it mapped. Outside a composite context it returns an empty list.
Date Helpers
parse_datetime uses Python ISO parsing:
timezone_offset(iana, at) returns the UTC offset for an IANA timezone at a specific datetime. If at is omitted it uses the current datetime; if at has no offset it is treated as local wall time in the supplied timezone. Invalid input returns "".
Random Helpers
random_int(min_value, max_value)— an integer between the bounds, inclusiverandom_choice(values)— one item from a non-empty list, orNonewhen emptyrandom_shuffle(values)— a shuffled copy of the list; the original is not mutated
Regex Helper
JSON Helpers
Not Allowed
importorfrom ... import ...- Filesystem, network, shell, or subprocess access
- Reflection and dynamic execution —
eval,exec,compile,open,__import__ - Dunder names or dunder attributes
- Lambdas, nested functions, classes
- Any unlisted function or method
Next Steps
- Code Step overview — The
run()contract and variables - Examples — Common patterns and troubleshooting

