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, global, const, or env). 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, account environment variables ({{env.*}}), 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.

What {{env.*}} means

The env namespace holds account environment variables you define once in Settings → Environment variables. They are shared across every workflow you own and resolve in the base context on each hop (the same phase as {{const.*}} and {{global.*}}), not after the step finishes.

Tokens look like {{env.api_key}}. Keys are lowercase with letters, numbers, hyphens, and underscores. In the editor, autocomplete lists them as Env · your_key. Validate workflow flags unknown env keys if you typo a name or delete a variable in Settings.

env is not the same as workflow globals ({{global.tenant_id}}, built on the graph during a run) or workflow constants ({{const.api_base_url}}, per-workflow Settings). Secret values live in Settings and Vault, not on nodes. For how to create variables, storage, and exposure risks, see Environment variables.

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 Workflow settings, not by the runner.
env{{env.api_key}}Account environment variables from App Settings (object). Vault-backed; available on every hop in the base context. Keys are defined in Settings, not on the graph. Autocomplete: Env · key. See What env.* means and Environment variables.
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), plus relative ago_* / in_* ISO offsets. Fully enumerated under System expression variables; see also Date and time expression tokens for a focused guide.

System expression variables

These tokens are merged into every expression-capable field in the editor (alongside workflow-specific tags such as {{input.*}}, {{global.*}}, {{const.*}}, and {{env.*}} 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).

For how {{now.iso}} and relative now.ago_* / now.in_* tokens behave together, read Date and time expression 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.
{{now.ago_10m}}Now · 10 minutes ago (ISO) UTC instant 10 minutes before resolution time, as ISO 8601. Same pattern as `{{now.ago_<N><unit>}}`, units: m, h, d, w, mo (30 days), y (365 days); e.g. `{{now.ago_2h}}`.
{{now.ago_30m}}Now · 30 minutes ago (ISO) UTC instant 30 minutes before resolution time, as ISO 8601.
{{now.ago_1h}}Now · 1 hour ago (ISO) UTC instant one hour before resolution time, as ISO 8601.
{{now.ago_6h}}Now · 6 hours ago (ISO) UTC instant six hours before resolution time, as ISO 8601.
{{now.ago_1d}}Now · 1 day ago (ISO) UTC instant one day before resolution time, as ISO 8601.
{{now.ago_7d}}Now · 7 days ago (ISO) UTC instant seven days before resolution time, as ISO 8601.
{{now.ago_30d}}Now · 30 days ago (ISO) UTC instant 30 days before resolution time, as ISO 8601.
{{now.ago_1y}}Now · 1 year ago (ISO) UTC instant 365 days before resolution time, as ISO 8601.
{{now.in_10m}}Now · in 10 minutes (ISO) UTC instant 10 minutes after resolution time, as ISO 8601. Same pattern as `{{now.in_<N><unit>}}`, units: m, h, d, w, mo (30 days), y (365 days); e.g. `{{now.in_14d}}`.
{{now.in_30m}}Now · in 30 minutes (ISO) UTC instant 30 minutes after resolution time, as ISO 8601.
{{now.in_1h}}Now · in 1 hour (ISO) UTC instant one hour after resolution time, as ISO 8601.
{{now.in_6h}}Now · in 6 hours (ISO) UTC instant six hours after resolution time, as ISO 8601.
{{now.in_1d}}Now · in 1 day (ISO) UTC instant one day after resolution time, as ISO 8601.
{{now.in_7d}}Now · in 7 days (ISO) UTC instant seven days after resolution time, as ISO 8601.
{{now.in_30d}}Now · in 30 days (ISO) UTC instant 30 days after resolution time, as ISO 8601.
{{now.in_1y}}Now · in 1 year (ISO) UTC instant 365 days after resolution time, as ISO 8601.

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