CEL functions reference
AutoTalk evaluates CEL with CEL-Go in the browser and server. Platform helpers
use <family>.<camelCase>. Standard CEL functions, receiver macros and
extension namespaces keep their canonical syntax. Tenant functions use
<slug>.<function> from an exact imported library release.
Schema generation 4 uses short roots: maps.get(...), values.coalesce(...)
and labels.normalizeName(...) for an imported labels library. The old
autotalk.* and tenant.* spellings are unavailable. Native optional.*,
cel.bind, global builtins and receiver syntax remain; native quote conversion
is text.quote(...).
| Function family | Purpose |
|---|---|
maps, values | Safe paths, defaults, presence and immutable maps |
lists, text | List transforms, joining, templates and text normalization |
datetime | UTC-based date operations and explicit time-unit conversions |
phone, br | Phone parsing/display and Brazilian CPF validation |
json, bson, toon | Serialization and BSON values |
math, number, url | Numeric helpers, currency and URL formatting |
workflow | Step outputs in workflows and agent action chains |
form, i18n | UI helpers and translation, available in forms only |
The generated catalog gives each function's call syntax, types, context and purity. There are no unqualified platform aliases or JavaScript arrow callbacks in CEL.
Maps and presence
Safe paths and fallback values
maps.get(contact, "address.city", "Unknown")
values.coalesce(maps.get(contact, "name"), "Guest")
values.firstPresent(["", null, "Alice", "Guest"])
A missing path uses the maps.get default. An explicit null at the
resolved leaf stays null; use values.coalesce to replace it. Coalesce
preserves zero, false and empty text. firstPresent additionally skips blank
text and empty lists. Variadic coalesce calls accept up to twelve arguments.
Presence
values.present(value) treats null, whitespace-only text and empty
lists as absent, while zero and false are present.
Blank values
values.blank(value) is the inverse of present.
has(contact.name)
maps.has(contact, "name")
contact.?nickname.orValue("Guest")
Native has(contact.name) checks field presence: an explicitly null field is
present. maps.has checks a non-null path. Optional orValue falls back
only when absent, not when a present value is null. A missing root variable is
an error; it is not automatically injected as null.
Immutable maps
maps.defaults(record, {"status": "unknown"})
maps.merge(record, {"status": "confirmed", "note": null})
maps.pick(record, ["name", "status"])
maps.omit(record, ["internalNote"])
Defaults fills missing/null keys. Merge is shallow and rightmost values win, including false, zero, empty text and null. Neither changes the original map.
Lists and text
List slicing
lists.slice(list, start, end?) supports negative indexes and returns
an empty list for non-list input. lists.pluck(list, path) reads a dotted
path from each item. Standard list.filter(variable, predicate) and
list.map(variable, transform) keep receiver syntax.
Mapping and joining
lists.mapList(people, person,
values.coalesce(maps.get(person, "name"), "Guest"))
lists.join(["Alice", null, "Bob"], " | ")
Join returns "Alice | | Bob": null/empty items retain their separator positions, and false and zero are included. A null list returns empty text; the separator defaults to comma. A missing variable or field can fail while evaluating the argument, before join runs. Native dates render as ISO text.
Templates
text.template("Hello {name}!", {"name": "Alice"})
text.template("{address.city}", contact)
Placeholders support dotted paths; missing/null values become empty text.
Conditional joining
text.joinPresent(" · ", "Title", null, "Author")
lists.join(parts.filter(part, values.present(part)), "\n")
joinPresent skips blanks and accepts up to eleven values after its separator.
Use a filtered list for a dynamic number of parts.
Truncation and normalization
text.truncate(text, maxLength, suffix?) includes the suffix within the
maximum length. fold applies NFKD, removes combining marks and lowercases
without changing whitespace. nameKey also collapses whitespace and trims.
singleLine collapses whitespace while preserving case and accents.
text.replace performs literal replacement only; use regex.replace for pattern replacements.
Dates and time
Explicit clock inputs
datetime.now() returns the current UTC ISO instant and is
nondeterministic. Obtain it in the caller, then pass it to pure tenant functions.
datetime.localTimeZone() explicitly reads the evaluating browser or
server's configured zone. It is contextual and cannot appear inside a tenant
library body; obtain it in the caller and pass the zone as a parameter. Other
shared date helpers are pure and default to UTC and fixed English.
datetime.format(clock, "DD/MM/YYYY HH:mm", "America/Sao_Paulo")
datetime.add(clock, 1, "day", "America/Sao_Paulo")
datetime.diff(clock, previous, "day", "America/Sao_Paulo")
datetime.isBetween(clock, start, end, "day", "[]", "UTC")
Calendar units use the explicit zone's calendar; sub-day additions are elapsed
time. diff(a, b, unit?, zone?) truncates its result; explicit-zone day/week
differences account for daylight-saving offsets, while hour/minute differences
measure elapsed time. isBetween accepts both six arguments and a fifth-slot timezone when the
sixth is omitted. Missing/free-form dates are rejected. zoned(date, time, zone, format?) creates an instant from a local wall clock; custom formats must contain
year/month/day, match strictly and use English parsing.
Time units and typed conversions
int(v) and other native conversions are typed. Check the text before converting
it; presence is not a conversion error handler.
qty.matches("^-?[0-9]+$") ? int(qty) : 0
timestamp(1705276800)
datetime.fromMillis(1705276800000)
datetime.toMillis(timestamp("2024-01-15T00:00:00Z"))
uint("42") + 1u
Native timestamp(int) and int(timestamp) use Unix seconds. int(duration)
uses nanoseconds; construct durations from explicit text such as duration("60s").
The pure millisecond helpers make an external system's units explicit and enforce
the native timestamp range, years 0001–9999. Host Date adaptation has millisecond
precision. Invalid numeric conversions raise an error rather than yielding a
usable fallback.
Native getters are receiver calls. timestamp.getDayOfMonth() is zero-based;
timestamp.getDate() is one-based. type(x) == string is a valid type comparison.
Standard CEL and extensions
CEL keeps size, int, uint, double, bool, string, bytes, timestamp,
duration, type, dyn, has, the in operator and receiver macros. Use
cel.bind for an expression-local value, optional selection for presence,
sortBy/two-variable transforms for collections, and standard extension
namespaces such as regex, math, sets, lists and base64.
Native math and coercing helpers
math.abs, math.ceil, math.floor, math.round and math.sqrt use native
CEL numeric contracts. For example, type(math.abs(-3)) == int. The coercing
platform functions have explicit names: math.absCoerced, math.ceilCoerced,
math.floorCoerced, math.roundDecimal and math.sqrtCoerced.
type(math.absCoerced(-3)) == double; math.roundDecimal(12.345, 2) accepts
an optional decimal-place count. Choose the contract deliberately; the short
native names are not aliases for the coercing functions.
lists.mapList(items, item, expression) is the platform mapping macro.
items.map(item, expression) remains a native receiver macro, and
lists.range(...) remains native. json.encode(...) and base64.* keep their
native contracts. Use text.quote(...) to produce CEL-quoted string text;
bson.ObjectId is the BSON type constant, for example
type(contact._id) == bson.ObjectId when the input is a real ObjectId.
Short-circuit conditions
cel.bind(stamp, maps.get(record, "deadline"),
values.present(stamp) && datetime.isAfter(clock, stamp))
When the left side decides an && or ||, the other side need not run. Ordinary
CEL error absorption follows CEL rules; evaluation limits
fail the evaluation rather than becoming successful business results. Hook
filters have their own context and budget.
Regular expressions
name.matches("(?i:alice)")
name.matches("^[\\p{L} ]+$")
regex.extract("ID:123", "ID:([0-9]+)").orValue("")
regex.extractAll("ID:123 ID:456", "ID:([0-9]+)")
Patterns use native RE2 syntax, including Unicode classes and scoped flags. Lookaround and backreferences are unsupported. Test patterns with realistic fixtures. Ordinary agent/workflow saves can report compile findings without rejecting the save; an invalid stored expression still fails whenever it runs. Library publication requires successful compilation and configured fixtures.
Evaluation limits
CEL-Go tracks execution cost. Time, string/list/map, byte and value-growth limits also
apply; nested tenant calls share the caller's budget. A budget refusal stops the
evaluation. Fix the expression or its data rather than swallowing the refusal.
Native budget diagnostics use resource_budget_exceeded. Byte ceilings are
8 MiB per value and 64 MiB produced during an evaluation; nested calls share the
same limits. Reuse repeated work with cel.bind or
a pure tenant function instead of expanding the same calculation many times.
Workflow and agent outputs
Step success
workflow.stepOk(0)
workflow.stepError(0)
Helpers reference an existing previous step in the current action chain.
stepOk requires completed execution and HTTP status 200 or no HTTP status.
stepError returns a safe error descriptor or null.
Step data
workflow.stepData(0, "title", "Unknown")
workflow.stepData(1, "choices.0.message.content", "")
workflow.stepHasContent(1, "choices")
Paths are relative to data when the action publishes that envelope. Do not add
an extra data prefix. Missing paths use the default; an invalid step index is
an error. stepHasContent combines successful execution and meaningful data.
Root-shaped and code outputs
Read the action's declared outputs. Root-shaped actions publish fields such as
count, choices or file directly. The helper resolves those root fields
when no data/result envelope exists.
These 23 actions publish their declared outputs at the step root, without a
data or result envelope:
| Action | Root outputs |
|---|---|
actions/ai/agent/send | messages |
actions/ai/llm/chat/generate | choices |
actions/agent/lifecycle/session/set_reply_delay | replyDelayMs |
actions/agent/lifecycle/session/wait_for_user | deferredUntil, seconds |
actions/ai/text/speakable | text, model |
actions/data/company/resource/count | count |
actions/mcp/connect | url, toolCount |
actions/mcp/connect/autotalk-mcp | url, toolCount |
actions/media/audio/synthesize | file, bucket, fullPath, size, contentType, format, cache, billedMeter, billedMs |
actions/media/audio/transcribe | jobId, jobStatus, enginePath, providerType, diarized |
actions/media/document/generate | file, bucket, fullPath, fileName, size, contentType, format |
actions/media/read | text, supported, truncated, reason, mediaKind, mimeType, fileName, size |
actions/media/storage/delete | deleted, existed, bucket, fullPath |
actions/media/storage/probe | durationSeconds, width, height, formatName, videoCodec, audioCodec, hasAudio, sizeBytes, contentType, cached |
actions/media/storage/signed-url | signedUrl, contentType, size, mediaKind, bucket, fullPath, name, expiresAt, file |
actions/media/storage/upload | file, signedUrl, contentType, size |
actions/messaging/contact/send | messages |
actions/messaging/conversation/response/compose | messages |
actions/media/transform | jobId, jobStatus, preset |
actions/monitors/cancel | monitorId, monitorState |
actions/monitors/create | monitorId, monitorState, expiresAtIso |
actions/network/http/download-to-storage | status, file, signedUrl, contentType, size |
actions/security/auth/jwt/generate | jwt |
Read a root field explicitly with qualified helpers:
maps.get(workflow.step(0), "count", 0)
maps.get(workflow.step(1), "files", [])
Execute code publishes result: workflow.stepData(N, "count")
resolves workflow.step(N).result.count. Its root siblings files,
logs and executionTimeMs need explicit root access.
Some step outputs keep real ObjectId values: Update company data with a filter, Execute Workflow at workflow.step(N).data.workflow, and Send message / Compose response at workflow.step(N).messages. ==, != compare ids; string operations such as startsWith() require bson.objectIdToString() first.
Save-time diagnostics
Ordinary agent/workflow saves return compile findings in warnings:
CEL_COMPILE_ERROR has severity: "error". The bounded save-time lint skips
expressions over 8,192 characters or beyond the remaining 10,000 characters of
CEL per agent or workflow, system prompts included, and reports
CEL_TOO_LARGE_TO_LINT. A skipped expression is still compiled when it runs.
Clearly unquoted prose uses a separate bounded parser check so a long prompt
can still receive a useful CEL/text diagnostic. Tenant library publication
requires successful compile and fixture validation.
Safe errors
workflow.stepError returns safe execution error details or null.
Content checks
workflow.stepHasContent requires successful execution and meaningful
content. Both helpers are unavailable inside pure tenant library bodies.
Other shared and form helpers
url.params("https://api.example.com/search", {"q": query})
number.formatCurrency("BRL", "pt-BR", 100.0)
math.clamp(value, 0, 100)
URL formatting
url.params adds encoded query parameters; url.encode encodes
text for a URL.
Numeric clamping
math.clamp(value, minimum, maximum) bounds a numeric value.
Phone helpers require an explicit source mode for bare international digits or
WhatsApp addresses. National input needs defaultCountry; WhatsApp LID values
are not phone numbers. br.cpfValid checks shape and checksum; tenant
business acceptance policies belong in tenant code.
Form formatting and i18n.t depend on the form context and are not
workflow helpers. The generated catalog shows each helper's availability.
Tenant libraries
Create libraries in Automations → Libraries (New library → CEL), or through the
cel_libraries Dynadata model with MCP/API. Functions have named typed
parameters, a return type, a CEL body and JSON fixtures. Bodies receive only
parameters and pure shared/imported functions: pass the clock, contact or saved
record explicitly. They cannot read ambient step/form/agent state or perform I/O.
Save a structured draft, validate, run its fixtures and publish the saved
draftRevision. Publication checks compilation and fixtures again and produces
an immutable exact release. The caller's root import field pins that release:
{"celLibraries": [{"libraryId": "000000000000000000000001", "releaseId": "000000000000000000000002"}]}
Use returned IDs, not these placeholders. Calls use labels.normalizeName(...)
for a library whose slug is labels. Editing or publishing a draft never
silently changes existing callers; select a new exact release deliberately.
Library dependencies also pin exact releases.
labels.normalizeName(value) belongs to the tenant that defines and imports the labels library. It is not a globally provided function. See the editor guide for a complete typed draft and UI/MCP/API workflow.
Library roots and data
A library slug is its root namespace: labels.normalizeName(...). Slugs are
stable, at most 48 characters, and use a lowercase letter followed by lowercase
letters, digits or underscores. Platform/native roots, retired roots
(autotalk, tenant, strings), CEL keywords/global builtins/type names and
security keys are reserved. Use a distinct business name such as clinic or
labels. Ordinary valid parameter/member names such as values, math,
lists, map or all remain usable inside a library.
Functions and data can share a root name: values.coalesce(...) calls a helper,
while values.name reads form data. To make a data receiver explicit when a
qualified helper/import would capture it, use dyn(lists).join(","). This
keeps the receiver value but weakens static type checking and consumes ordinary
evaluation cost. Review diagnostics when changing imports. A catalog entry
alone neither imports a library nor changes a receiver such as clinic.size().
bson.ObjectId names the BSON type constant. To read an ordinary data field
named ObjectId on a bson variable, use brackets: bson['ObjectId']. This
keeps data-field type checking and missing-field errors. For example, this
self-contained expression returns "data":
cel.bind(bson, {'ObjectId': 'data'}, bson['ObjectId'])
Generated function catalog
Generated from Commons metadata. Call syntax, types, contexts and purity come from the same contract used by the editor and MCP.
base64
| Call | Typed signature | Context | Purity |
|---|---|---|---|
base64.decode(value) | base64.decode(string) -> bytes | Workflow, Agent, Form | pure |
base64.encode(value) | base64.encode(bytes) -> string | Workflow, Agent, Form | pure |
br
| Call | Typed signature | Context | Purity |
|---|---|---|---|
br.cpfValid(value) | br.cpfValid(dyn) -> bool | Workflow, Agent, Form | pure |
bson
| Call | Typed signature | Context | Purity |
|---|---|---|---|
bson.deserialize(bsonString, encoding?) | bson.deserialize(string, string?) -> dyn | Workflow, Agent, Form | pure |
bson.ejsonParse(ejsonString, relaxed?) | bson.ejsonParse(string, bool?) -> dyn | Workflow, Agent, Form | pure |
bson.ejsonStringify(value, relaxed?) | bson.ejsonStringify(dyn, bool?) -> string | Workflow, Agent, Form | pure |
bson.objectId(value?) | bson.objectId(dyn?) -> objectId | Workflow, Agent, Form | nondeterministic |
bson.objectIdIsValid(value) | bson.objectIdIsValid(dyn) -> bool | Workflow, Agent, Form | pure |
bson.objectIdToString(value) | bson.objectIdToString(dyn) -> string | Workflow, Agent, Form | pure |
bson.serialize(value, encoding?) | bson.serialize(dyn, string?) -> string | Workflow, Agent, Form | pure |
CEL standard library and extensions
| Call | Typed signature | Context | Purity |
|---|---|---|---|
list.all(var, predicate) | list<any>.all(identifier, bool) -> bool | Workflow, Agent, Form | pure |
bool(value) | bool(string|bool) -> bool | Workflow, Agent, Form | pure |
bytes(value) | bytes(string|bytes) -> bytes | Workflow, Agent, Form | pure |
cel.bind(variable, initial, expression) | cel.bind(identifier, T, R) -> R | Workflow, Agent, Form | pure |
text.charAt(index) | string.charAt(int) -> string | Workflow, Agent, Form | pure |
text.contains(substr) | string.contains(string) -> bool | Workflow, Agent, Form | pure |
list.distinct() | list<T>.distinct() -> list<T> | Workflow, Agent, Form | pure |
double(value) | double(number|string) -> double | Workflow, Agent, Form | pure |
duration(value) | duration(string|duration) -> duration | Workflow, Agent, Form | pure |
dyn(value) | dyn(any) -> dyn | Workflow, Agent, Form | pure |
text.endsWith(suffix) | string.endsWith(string) -> bool | Workflow, Agent, Form | pure |
list.exists(var, predicate) | list<any>.exists(identifier, bool) -> bool | Workflow, Agent, Form | pure |
list.exists_one(var, predicate) | list<any>.exists_one(identifier, bool) -> bool | Workflow, Agent, Form | pure |
list.filter(var, predicate) | list<any>.filter(identifier, bool) -> list<any> | Workflow, Agent, Form | pure |
list.first() | list<T>.first() -> optional<T> | Workflow, Agent, Form | pure |
list.flatten(depth?) | list<dyn>.flatten(int?) -> list<T> | Workflow, Agent, Form | pure |
format.format(args) | string.format(list<any>) -> string | Workflow, Agent, Form | pure |
timestamp.getDate(tz?) | timestamp.getDate(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getDayOfMonth(tz?) | timestamp.getDayOfMonth(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getDayOfWeek(tz?) | timestamp.getDayOfWeek(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getDayOfYear(tz?) | timestamp.getDayOfYear(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getFullYear(tz?) | timestamp.getFullYear(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getHours(tz?) / duration.getHours() | timestamp.getHours(string?) -> int / duration.getHours() -> int | Workflow, Agent, Form | pure |
timestamp.getMilliseconds(tz?) / duration.getMilliseconds() | timestamp.getMilliseconds(string?) -> int / duration.getMilliseconds() -> int | Workflow, Agent, Form | pure |
timestamp.getMinutes(tz?) / duration.getMinutes() | timestamp.getMinutes(string?) -> int / duration.getMinutes() -> int | Workflow, Agent, Form | pure |
timestamp.getMonth(tz?) | timestamp.getMonth(string?) -> int | Workflow, Agent, Form | pure |
timestamp.getSeconds(tz?) / duration.getSeconds() | timestamp.getSeconds(string?) -> int / duration.getSeconds() -> int | Workflow, Agent, Form | pure |
has(selection) | has(select expression) -> bool | Workflow, Agent, Form | pure |
optional.hasValue() | optional<T>.hasValue() -> bool | Workflow, Agent, Form | pure |
text.indexOf(substr, start?) | string.indexOf(string, int?) -> int | Workflow, Agent, Form | pure |
int(value) | int(number|string|timestamp|duration) -> int | Workflow, Agent, Form | pure |
list.join(sep?) | list<string>.join(string?) -> string | Workflow, Agent, Form | pure |
list.last() | list<T>.last() -> optional<T> | Workflow, Agent, Form | pure |
text.lastIndexOf(substr, start?) | string.lastIndexOf(string, int?) -> int | Workflow, Agent, Form | pure |
text.lowerAscii() | string.lowerAscii() -> string | Workflow, Agent, Form | pure |
list.map(var, expr) | list<any>.map(identifier, any) -> list<any> | Workflow, Agent, Form | pure |
text.matches(pattern) | string.matches(string) -> bool | Workflow, Agent, Form | pure |
optional.optFlatMap(variable, expression) | optional<T>.optFlatMap(identifier, optional<R>) -> optional<R> | Workflow, Agent, Form | pure |
optional.optMap(variable, expression) | optional<T>.optMap(identifier, R) -> optional<R> | Workflow, Agent, Form | pure |
optional.or(fallback) | optional<T>.or(optional<T>) -> optional<T> | Workflow, Agent, Form | pure |
optional.orValue(fallback) | optional<T>.orValue(T) -> T | Workflow, Agent, Form | pure |
text.replace(substr, repl, count?) | string.replace(string, string, int?) -> string | Workflow, Agent, Form | pure |
value.reverse() | list<T>|string.reverse() -> list<T>|string | Workflow, Agent, Form | pure |
size(value) | size(list|map|string|bytes) -> int | Workflow, Agent, Form | pure |
list.slice(start, end) | list<T>.slice(int, int) -> list<T> | Workflow, Agent, Form | pure |
list.sort() | list<T>.sort() -> list<T> | Workflow, Agent, Form | pure |
list.sortBy(variable, key) | list<T>.sortBy(identifier, comparable expression) -> list<T> | Workflow, Agent, Form | pure |
text.split(sep, limit?) | string.split(string, int?) -> list<string> | Workflow, Agent, Form | pure |
text.startsWith(prefix) | string.startsWith(string) -> bool | Workflow, Agent, Form | pure |
string(value) | string(bool|int|uint|double|string|bytes|timestamp|duration|ObjectId) -> string | Workflow, Agent, Form | pure |
text.substring(start, end?) | string.substring(int, int?) -> string | Workflow, Agent, Form | pure |
timestamp(value) | timestamp(string|int|timestamp) -> timestamp | Workflow, Agent, Form | pure |
collection.transformList(keyOrIndex, value, predicateOrTransform, transform?) | list<T>|map<K,T>.transformList(identifier, identifier, bool|R, R?) -> list<R> | Workflow, Agent, Form | pure |
collection.transformMap(keyOrIndex, value, predicateOrTransform, transform?) | list<T>|map<K,T>.transformMap(identifier, identifier, bool|R, R?) -> map<K,R> | Workflow, Agent, Form | pure |
collection.transformMapEntry(keyOrIndex, value, predicateOrTransform, transform?) | list<T>|map<K,T>.transformMapEntry(identifier, identifier, bool|map<K,R>, map<K,R>?) -> map<K,R> | Workflow, Agent, Form | pure |
text.trim() | string.trim() -> string | Workflow, Agent, Form | pure |
type(value) | type(any) -> type | Workflow, Agent, Form | pure |
uint(value) | uint(number|string) -> uint | Workflow, Agent, Form | pure |
text.upperAscii() | string.upperAscii() -> string | Workflow, Agent, Form | pure |
optional.value() | optional<T>.value() -> T | Workflow, Agent, Form | pure |
datetime
| Call | Typed signature | Context | Purity |
|---|---|---|---|
datetime.add(isoOrMs, amount, unit, tz?) | datetime.add(string|int|double|timestamp, int|double, string, string?) -> string | Workflow, Agent, Form | pure |
datetime.diff(a, b, unit?, tz?) | datetime.diff(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> double | Workflow, Agent, Form | pure |
datetime.format(isoOrMs, fmt, tz?, locale?) | datetime.format(string|int|double|timestamp, string, string?, string?) -> string | Workflow, Agent, Form | pure |
datetime.fromMillis(milliseconds) | datetime.fromMillis(int|double) -> timestamp | Workflow, Agent, Form | pure |
datetime.isAfter(a, b, unit?, tz?) | datetime.isAfter(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.isBefore(a, b, unit?, tz?) | datetime.isBefore(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.isBetween(value, start, end, unit?, inclusivity?, tz?) | datetime.isBetween(string|int|double|timestamp, string|int|double|timestamp, string|int|double|timestamp, string?, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.isSameDate(a, b, unit?, tz?) | datetime.isSameDate(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.isSameOrAfter(a, b, unit?, tz?) | datetime.isSameOrAfter(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.isSameOrBefore(a, b, unit?, tz?) | datetime.isSameOrBefore(string|int|double|timestamp, string|int|double|timestamp, string?, string?) -> bool | Workflow, Agent, Form | pure |
datetime.localTimeZone() | datetime.localTimeZone() -> string | Workflow, Agent, Form | contextual |
datetime.now(tz?) | datetime.now(string?) -> string | Workflow, Agent, Form | nondeterministic |
datetime.toMillis(timestamp) | datetime.toMillis(timestamp) -> double | Workflow, Agent, Form | pure |
datetime.zoned(dateStr, timeStr, tz, format?) | datetime.zoned(string, string, string, string?) -> string | Workflow, Agent, Form | pure |
form
| Call | Typed signature | Context | Purity |
|---|---|---|---|
form.argsOf(node) | form.argsOf(map<string,dyn>|null) -> dyn | Form | pure |
form.compact(value) | form.compact(dyn) -> string | Form | contextual |
form.concat(...parts) | form.concat(...dyn) -> string | Form | pure |
form.evalActionPreview(action) | form.evalActionPreview(map<string,dyn>) -> string|null | Form | contextual |
form.formatDate(value, format?) | form.formatDate(dyn, string?) -> string | Form | contextual |
form.formatPhone(value) | form.formatPhone(dyn) -> string | Form | pure |
form.getField(type) | form.getField(string) -> map<string,dyn>|null | Form | contextual |
form.innerEval(expr) | form.innerEval(string) -> dyn | Form | contextual |
form.isChatTabActive(conversationId) | form.isChatTabActive(dyn) -> bool | Form | contextual |
form.isChatTabOpen(conversationId) | form.isChatTabOpen(dyn) -> bool | Form | contextual |
form.isTabOpen(tabId) | form.isTabOpen(dyn) -> bool | Form | contextual |
form.len(value) | form.len(dyn) -> double | Form | pure |
form.log(...args) | form.log(...dyn) -> null | Form | effectful |
form.money(value, currency?, locale?) | form.money(dyn, string?, string?) -> string | Form | pure |
form.navigate(to) | form.navigate(dyn) -> null | Form | effectful |
form.number(value) | form.number(dyn) -> string | Form | contextual |
form.objectKeys(value) | form.objectKeys(map<string,dyn>) -> list<string> | Form | pure |
form.pluralize(value, one, many) | form.pluralize(dyn, string, string) -> string | Form | pure |
form.randomApiTokenAlias() | form.randomApiTokenAlias() -> string | Form | nondeterministic |
form.scope(overrides, expr) | form.scope(map<string,dyn>, string) -> dyn | Form | contextual |
form.shortId(id) | form.shortId(dyn) -> string | Form | pure |
form.timeAgo(value) | form.timeAgo(dyn) -> string | Form | nondeterministic |
form.toast(msg) | form.toast(dyn) -> dyn | Form | effectful |
form.ucFirst(value) | form.ucFirst(dyn) -> string | Form | pure |
i18n
| Call | Typed signature | Context | Purity |
|---|---|---|---|
i18n.t(key) | i18n.t(string) -> string | Form | contextual |
json
| Call | Typed signature | Context | Purity |
|---|---|---|---|
json.encode(value) | json.encode(dyn) -> string | Workflow, Agent, Form | pure |
json.parse(jsonString) | json.parse(string) -> dyn | Workflow, Agent, Form | pure |
json.stringify(value, space?) | json.stringify(dyn, int|double?) -> string | Workflow, Agent, Form | pure |
lists
| Call | Typed signature | Context | Purity |
|---|---|---|---|
lists.join(list, separator?) | lists.join(list<dyn>|null, string?) -> string | Workflow, Agent, Form | pure |
lists.mapList(list, variable, transform) | lists.mapList(list<dyn>, identifier, expression) -> list<dyn> | Workflow, Agent, Form | pure |
lists.pluck(arr, path) | lists.pluck(list<dyn>|null, string) -> list<dyn>|null | Workflow, Agent, Form | pure |
lists.range(end) | lists.range(int) -> list<int> | Workflow, Agent, Form | pure |
lists.slice(arr, start, end?) | lists.slice(dyn, int|double, int|double|null?) -> list<dyn> | Workflow, Agent, Form | pure |
maps
| Call | Typed signature | Context | Purity |
|---|---|---|---|
maps.defaults(obj, fallbacks) | maps.defaults(map<string,dyn>|null, map<string,dyn>) -> map<string,dyn> | Workflow, Agent, Form | pure |
maps.get(obj, prop, defaultValue?) | maps.get(dyn, string, dyn?) -> dyn | Workflow, Agent, Form | pure |
maps.has(obj, prop?) | maps.has(dyn, string?) -> bool | Workflow, Agent, Form | pure |
maps.merge(...maps) | maps.merge(...map<string,dyn>|null) -> map<string,dyn> | Workflow, Agent, Form | pure |
maps.omit(map, keys) | maps.omit(map<string,dyn>|null, list<string>) -> map<string,dyn> | Workflow, Agent, Form | pure |
maps.pick(map, keys) | maps.pick(map<string,dyn>|null, list<string>) -> map<string,dyn> | Workflow, Agent, Form | pure |
maps.set(map, key, value) | maps.set(map<string,dyn>|null, string, dyn) -> map<string,dyn> | Workflow, Agent, Form | pure |
math
| Call | Typed signature | Context | Purity |
|---|---|---|---|
math.abs(value) | math.abs(int|uint|double) -> int|uint|double | Workflow, Agent, Form | pure |
math.absCoerced(value) | math.absCoerced(int|double) -> double | Workflow, Agent, Form | pure |
math.add(a, b) | math.add(int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.bitAnd(first, second) | math.bitAnd(int|uint, int|uint) -> int|uint | Workflow, Agent, Form | pure |
math.bitNot(value) | math.bitNot(int|uint) -> int|uint | Workflow, Agent, Form | pure |
math.bitOr(first, second) | math.bitOr(int|uint, int|uint) -> int|uint | Workflow, Agent, Form | pure |
math.bitShiftLeft(first, second) | math.bitShiftLeft(int|uint, int) -> int|uint | Workflow, Agent, Form | pure |
math.bitShiftRight(first, second) | math.bitShiftRight(int|uint, int) -> int|uint | Workflow, Agent, Form | pure |
math.bitXor(first, second) | math.bitXor(int|uint, int|uint) -> int|uint | Workflow, Agent, Form | pure |
math.ceil(value) | math.ceil(double) -> double | Workflow, Agent, Form | pure |
math.ceilCoerced(value) | math.ceilCoerced(int|double) -> double | Workflow, Agent, Form | pure |
math.clamp(value, min, max) | math.clamp(int|double, int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.cos(value) | math.cos(int|double) -> double | Workflow, Agent, Form | pure |
math.divide(a, b) | math.divide(int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.dot(a, b) | math.dot(list<number>, list<number>) -> double | Workflow, Agent, Form | pure |
math.evaluate(expr) | math.evaluate(string) -> double | Workflow, Agent, Form | pure |
math.exp(value) | math.exp(int|double) -> double | Workflow, Agent, Form | pure |
math.floor(value) | math.floor(double) -> double | Workflow, Agent, Form | pure |
math.floorCoerced(value) | math.floorCoerced(int|double) -> double | Workflow, Agent, Form | pure |
math.greatest(...values) | math.greatest(...int|uint|double|list<number>) -> int|uint|double | Workflow, Agent, Form | pure |
math.isFinite(value) | math.isFinite(double) -> bool | Workflow, Agent, Form | pure |
math.isInf(value) | math.isInf(double) -> bool | Workflow, Agent, Form | pure |
math.isNaN(value) | math.isNaN(double) -> bool | Workflow, Agent, Form | pure |
math.least(...values) | math.least(...int|uint|double|list<number>) -> int|uint|double | Workflow, Agent, Form | pure |
math.log(value, base?) | math.log(int|double, int|double?) -> double | Workflow, Agent, Form | pure |
math.max(arr) | math.max(list<number>) -> double | Workflow, Agent, Form | pure |
math.mean(arr) | math.mean(list<number>) -> double | Workflow, Agent, Form | pure |
math.median(arr) | math.median(list<number>) -> double | Workflow, Agent, Form | pure |
math.min(arr) | math.min(list<number>) -> double | Workflow, Agent, Form | pure |
math.multiply(a, b) | math.multiply(int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.norm(arr) | math.norm(list<number>) -> double | Workflow, Agent, Form | pure |
math.pow(base, exponent) | math.pow(int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.round(value) | math.round(double) -> double | Workflow, Agent, Form | pure |
math.roundDecimal(value, decimals?) | math.roundDecimal(int|double, int|double?) -> double | Workflow, Agent, Form | pure |
math.sign(value) | math.sign(int|uint|double) -> int|uint|double | Workflow, Agent, Form | pure |
math.sin(value) | math.sin(int|double) -> double | Workflow, Agent, Form | pure |
math.sqrt(value) | math.sqrt(int|uint|double) -> double | Workflow, Agent, Form | pure |
math.sqrtCoerced(value) | math.sqrtCoerced(int|double) -> double | Workflow, Agent, Form | pure |
math.std(arr) | math.std(list<number>) -> double | Workflow, Agent, Form | pure |
math.subtract(a, b) | math.subtract(int|double, int|double) -> double | Workflow, Agent, Form | pure |
math.tan(value) | math.tan(int|double) -> double | Workflow, Agent, Form | pure |
math.trunc(value) | math.trunc(double) -> double | Workflow, Agent, Form | pure |
math.variance(arr) | math.variance(list<number>) -> double | Workflow, Agent, Form | pure |
number
| Call | Typed signature | Context | Purity |
|---|---|---|---|
number.formatCurrency(currency, locale, amount) | number.formatCurrency(string, string, int|double) -> string | Workflow, Agent, Form | pure |
optional
| Call | Typed signature | Context | Purity |
|---|---|---|---|
optional.none() | optional.none() -> optional<dyn> | Workflow, Agent, Form | pure |
optional.of(value) | optional.of(T) -> optional<T> | Workflow, Agent, Form | pure |
optional.ofNonZeroValue(value) | optional.ofNonZeroValue(T) -> optional<T> | Workflow, Agent, Form | pure |
optional.unwrap(values) | optional.unwrap(list<optional<T>>) -> list<T> | Workflow, Agent, Form | pure |
phone
| Call | Typed signature | Context | Purity |
|---|---|---|---|
phone.display(value, options?) | phone.display(string|null, map<string,dyn>|null?) -> string | Workflow, Agent, Form | pure |
phone.isValid(value, options?) | phone.isValid(string|null, map<string,dyn>|null?) -> bool | Workflow, Agent, Form | pure |
phone.parse(value, options?) | phone.parse(string|null, map<string,dyn>|null?) -> map<string,dyn> | Workflow, Agent, Form | pure |
regex
| Call | Typed signature | Context | Purity |
|---|---|---|---|
regex.extract(text, pattern) | regex.extract(string, string) -> optional<string> | Workflow, Agent, Form | pure |
regex.extractAll(text, pattern) | regex.extractAll(string, string) -> list<string> | Workflow, Agent, Form | pure |
regex.replace(text, pattern, replacement, count?) | regex.replace(string, string, string, int?) -> string | Workflow, Agent, Form | pure |
sets
| Call | Typed signature | Context | Purity |
|---|---|---|---|
sets.contains(superset, subset) | sets.contains(list<T>, list<T>) -> bool | Workflow, Agent, Form | pure |
sets.equivalent(first, second) | sets.equivalent(list<T>, list<T>) -> bool | Workflow, Agent, Form | pure |
sets.intersects(first, second) | sets.intersects(list<T>, list<T>) -> bool | Workflow, Agent, Form | pure |
text
| Call | Typed signature | Context | Purity |
|---|---|---|---|
text.fold(value) | text.fold(string|null) -> string | Workflow, Agent, Form | pure |
text.joinPresent(separator, ...values) | text.joinPresent(string, ...dyn) -> string | Workflow, Agent, Form | pure |
text.nameKey(value) | text.nameKey(string|null) -> string | Workflow, Agent, Form | pure |
text.quote(text) | text.quote(string) -> string | Workflow, Agent, Form | pure |
text.singleLine(value) | text.singleLine(string|null) -> string | Workflow, Agent, Form | pure |
text.template(template, vars) | text.template(string, map<string,dyn>|null) -> string | Workflow, Agent, Form | pure |
text.truncate(str, maxLen, suffix?) | text.truncate(dyn, int|double, string?) -> string | Workflow, Agent, Form | pure |
toon
| Call | Typed signature | Context | Purity |
|---|---|---|---|
toon.decode(toonString) | toon.decode(string) -> dyn | Workflow, Agent, Form | pure |
toon.encode(value) | toon.encode(dyn) -> string | Workflow, Agent, Form | pure |
url
| Call | Typed signature | Context | Purity |
|---|---|---|---|
url.encode(str) | url.encode(string) -> string | Workflow, Agent, Form | pure |
url.params(base, params) | url.params(string, map<string,dyn>) -> string | Workflow, Agent, Form | pure |
values
| Call | Typed signature | Context | Purity |
|---|---|---|---|
values.blank(val) | values.blank(dyn) -> bool | Workflow, Agent, Form | pure |
values.coalesce(...args) | values.coalesce(...dyn) -> dyn | Workflow, Agent, Form | pure |
values.firstPresent(values) | values.firstPresent(list<dyn>|null) -> dyn | Workflow, Agent, Form | pure |
values.present(val) | values.present(dyn) -> bool | Workflow, Agent, Form | pure |
workflow
| Call | Typed signature | Context | Purity |
|---|---|---|---|
workflow.getContext() | workflow.getContext() -> map<string,dyn> | Workflow, Agent | contextual |
workflow.getRoot() | workflow.getRoot() -> map<string,dyn> | Workflow, Agent | contextual |
workflow.getTool() | workflow.getTool() -> map<string,dyn> | Workflow, Agent | contextual |
workflow.step(index?) | workflow.step(int|double|null?) -> map<string,dyn> | Workflow, Agent | contextual |
workflow.stepData(index, path?, default?) | workflow.stepData(int|double, string|null?, dyn?) -> dyn | Workflow, Agent | contextual |
workflow.stepError(index) | workflow.stepError(int|double) -> map<string,dyn>|null | Workflow, Agent | contextual |
workflow.stepHasContent(index, path?) | workflow.stepHasContent(int|double, string|null?) -> bool | Workflow, Agent | contextual |
workflow.stepOk(index) | workflow.stepOk(int|double) -> bool | Workflow, Agent | contextual |