Expression variables

Template placeholders you may have called function variables, tag variables, or merge fields: the `{{…}}` syntax that pulls live data into prompts, code, URLs, and output mappings.

What they are

An expression variable is a {{dot.path}} token. At run time the workflow engine replaces each token with a value from a resolution context (objects keyed by namespace, such as input, trigger_inputs, or global). Literals and multiple tags can be mixed in the same field; the result is usually a string that the runner may coerce (for example to a number) when a field has a type.

In the editor, fields that support tags offer autocomplete when you type {{. The same syntax appears in gate rules, HTTP templates, JavaScript source (resolved before the script runs), and output rows.

When they resolve

Resolution happens in two phases. The table below summarises what each phase can see.

PhaseDetails
Before the step runs

Typical fields: prompts, code bodies, webhook URLs, gate value cells, and similar pre-execution configuration.

Context: the base context: inbound graph data, globals so far, workflow constants, run and workflow metadata, step and user helpers, UTC now tokens, {{input.*}}, {{trigger_inputs.*}}, and so on. This phase does not include this step's own exe object yet.

After the step's main work

Typical fields: Output schema rows and Globals mappings for the same step.

Context: an output context that extends the base context with {{exe.*}}: model text, HTTP status, decision outcome, sandbox return value, or whatever that template produced.

What {{input.*}} means

For trigger steps, input is the workflow invoke payload (the same object as trigger_inputs). For every other step, input is the immediate predecessor's emitted output. You do not configure per-step input mapping; the edge into the step defines where the data comes from.

{{trigger_inputs.*}} always refers to the original invoke payload on every hop, which is useful deep in a branch.

{{prev.*}} is a legacy alias of input for older graphs; new copy should prefer input.

Main namespaces (types of value)

Each row is a prefix on the resolution object. Tokens look like {{namespace.key}}.

NamespaceExampleDescription
input · prev{{input.summary}}Predecessor output or trigger payload (object). Keys match your predecessor output schema or invoke field names. prev is a legacy alias for the same object.
trigger_inputs{{trigger_inputs.email}}Original workflow invoke payload for the run (object). Available on every hop.
global{{global.tenant_id}}Accumulated workflow globals from earlier steps (object). Keys come from globals schema rows across the graph; later writes for the same key win.
const{{const.api_base_url}}Workflow constants from workflow settings (object). Same values on every step when you configure them; keys are defined in Settings, not by the runner.
exe{{exe.text}}This step's execution result (object). Only in output and globals resolution, not in the raw prompt before the model or sandbox runs, unless the product resolves that field in a second pass.
run · workflow · step · user{{run.id}}Small metadata scalars (ids, workflow title, graph node id, signed-in runner). See System expression variables for the built-in list.
now{{now.iso}}UTC time helpers (ISO string, date, clock times, slug-friendly timestamps). Fully enumerated under System expression variables.

System expression variables

These tokens are merged into every expression-capable field in the editor (alongside workflow-specific tags such as {{input.*}}, {{global.*}}, and {{const.*}} when configured). Values are resolved by the runner at the time the expression is evaluated. See GLOBAL_PROMPT_TAGS in the codebase for the canonical list (the tables below are generated from that source).

Tables below use the same Value / Description layout as the Code learn page (purple monospace tokens).

Time helpers (UTC)

ValueDescription
{{now.iso}}Now (ISO 8601) Current UTC timestamp as an ISO 8601 string when the workflow resolves this expression.
{{now.unix_ms}}Now (Unix ms) Current time as Unix epoch milliseconds when this expression is resolved.
{{now.date}}Today (UTC date) Current calendar date in UTC as YYYY-MM-DD when this expression is resolved.
{{now.year}}Now · year (UTC) Four-digit calendar year in UTC when this expression is resolved.
{{now.day}}Now · day of month (UTC) Day of the month in UTC (1–31) when this expression is resolved.
{{now.month}}Now · month number (UTC) Month number in UTC (1 = January through 12 = December) when this expression is resolved.
{{now.month_full}}Now · month name (UTC, full) Full month name in UTC using the Australian English locale when this expression is resolved.
{{now.month_short}}Now · month name (UTC, short) Abbreviated month name in UTC using the Australian English locale when this expression is resolved.
{{now.time_24}}Now · time 24-hour (UTC) Current UTC time as HH:mm:ss (24-hour, zero-padded) when this expression is resolved.
{{now.time_12}}Now · time 12-hour (UTC) Current UTC time as h:mm:ss am/pm when this expression is resolved.
{{now.day_of_year}}Now · day of year (UTC) Ordinal calendar day within the UTC year (1–366) when this expression is resolved.
{{now.weekday_number}}Now · weekday ISO (UTC) ISO weekday number in UTC: 1 = Monday through 7 = Sunday when this expression is resolved.
{{now.weekday_full}}Now · weekday (UTC, full) Full weekday name in UTC using the Australian English locale when this expression is resolved.
{{now.weekday_short}}Now · weekday (UTC, short) Abbreviated weekday in UTC using the Australian English locale when this expression is resolved.
{{now.slug_timestamp}}Now · slug timestamp (UTC) Current UTC instant as `YYYY-MM-DD_HH-mm-ss`, suitable for filesystem-friendly prefixes.

Run metadata

ValueDescription
{{run.id}}Run · id Persisted workflow run row id for this traversal when attribution is present; empty otherwise.

Workflow metadata

ValueDescription
{{workflow.id}}Workflow · id Workflow definition id carried on the run envelope when attribution is present; empty otherwise.
{{workflow.name}}Workflow · name Persisted workflow title captured when the run starts; empty if not supplied on the envelope.

Step metadata

ValueDescription
{{step.id}}Step · graph node id React Flow id of the node currently resolving this tagged expression.

Runner profile

ValueDescription
{{user.name}}Runner · display name Signed-in workflow owner display name captured when the run starts (Australian English authoring context); empty if unknown.
{{user.email}}Runner · email Signed-in workflow owner email captured when the run starts; empty if unknown.

Types and coercion

Tags interpolate to text first. Where a row has a type (number, boolean, JSON, and so on), the runner coerces the resolved string. Keep formats predictable: for example ISO dates for date fields, plain digits for integers, and valid JSON inside a tag when a JSON field is expected.

Related