Context Variables
These variables are available in every expression field. Anything else that starts with $ is reported as an
unknown root in the editor and blocks publishing.
| Root | Type | Description |
|---|---|---|
$nodes | object | Outputs of earlier nodes, by node name |
$status | object | Success or failure of earlier nodes, by node name |
$trigger | any | The payload that started the run |
$vars | object | Workflow variables |
$secrets | object | Project secrets |
$inputs | object | Inputs of a sub-workflow or building block |
$execution | object | The current run |
$workflow | object | The running workflow |
$now, $today | DateTime | The current time, and midnight today (in the workflow's time zone, UTC by default) |
$item | any | The current element in a Transform array mapping |
Helper functions such as $dt and $sum are available too.
$nodes
The output of an earlier node, by the name shown on its card:
{{ $nodes['HTTP Request'].body.id }}
{{ $nodes['Parse CSV'].rows[0].email }}
{{ $nodes.Webhook.headers['user-agent'] }}
- Use bracket notation for names with spaces or special characters, with either quote:
$nodes["Manager's Approval"]or$nodes['Manager\'s Approval']. Dot notation works for simple names. - Write the node name literally. Blokkio loads the outputs of the nodes whose names appear in a field, so a
name built at runtime (for example
$nodes[$vars.nodeName]) won't resolve. - Only nodes that already ran in this execution have an output. Names are checked when you publish: a reference to a node that doesn't exist (for example after a rename) is reported as an unknown node.
- What each node outputs is described on its page in the node reference. The editor's picker and the node panel's Output pane show the actual fields.
- A step with many rows may output a dataset instead of a list.
rows[0]androws.lengthwork as usual, but only the first rows (the preview) are loaded: a row past the preview stops the step with a message that says to use a Loop. See Datasets in expressions.
$status
Whether an earlier node succeeded. Useful after a node whose errors are routed to an error port:
{{ $status['HTTP Request'].isSuccess }}
{{ $status['HTTP Request'].isSuccess ? 'ok' : $status['HTTP Request'].errorMessage }}
| Field | Type | Description |
|---|---|---|
isSuccess | boolean | true if the node completed without error |
errorMessage | string or null | The error message if the node failed, else null |
$trigger
The payload that started the run. Its shape depends on the trigger:
| Trigger | $trigger holds | Example |
|---|---|---|
| Webhook | { method, path, headers, query, queryParams, body, rawBody, files } | {{ $trigger.body.orderId }} |
| Form | { fields, files, submittedAt, meta } | {{ $trigger.fields.email }} |
| Schedule | { scheduledAt, firedAt, timezone, scheduledAtLocal } | {{ $trigger.scheduledAt }} |
| Database Row | The new row, one field per column | {{ $trigger.customer_email }} |
The message: subject, from, text, attachments, … | {{ $trigger.subject }} | |
| SFTP | The file: name, path, size, modifiedAt, file | {{ $trigger.path }} |
| RSS feed | The item: title, link, summary, content, published, author, feed | {{ $trigger.link }} |
| Manual | The data sent through the public API, or the failure details in an error workflow. Empty otherwise. | {{ $trigger.customerId }} |
$trigger is the same in every node of the run. In a test run started from the editor, $trigger is the JSON
object you enter in the Trigger data box of the Test Run dialog (empty if you leave it as {}), so you can
test with the same shape a real trigger would send.
The trigger node's output is also available by its name, for example $nodes['Webhook Trigger'].body.
$vars
Workflow variables set by Variable nodes earlier in the run:
{{ $vars.customerId }}
{{ $vars.retries ?? 0 }}
$secrets
Project secrets:
Bearer {{ $secrets.API_TOKEN }}
{{ $secrets['stripe-live-key'] }}
- If the run has an environment and the secret has a value for it, that value is used; otherwise the project-wide value.
- Reference secrets literally, as
$secrets.NAMEor$secrets['NAME']. Secrets are looked up by the names written in the field before the expression runs, so a name built at runtime ($secrets[$vars.keyName]) returnsundefined. A secret that doesn't exist is alsoundefined. - Secret values are masked (
••••••) in node outputs, logs, previews and error messages.
$inputs
The inputs passed to this workflow when it runs as a sub-workflow or as an installed building block:
{{ $inputs.email }}
{{ $inputs.limit ?? 10 }}
$inputs is empty for runs started by a trigger. Use $trigger for trigger payloads.
$execution
The current run:
| Field | Description |
|---|---|
id | The execution id, as shown in Logs |
mode | 'production' or 'test' |
startedAt | When the run started (ISO 8601, UTC) |
environmentId | The environment the run executes in, or null |
{{ $execution.id }}
{{ $execution.mode === 'test' ? 'sandbox@example.com' : $trigger.body.email }}
$workflow
The running workflow: id, name and timezone (the IANA time zone from the workflow settings, "UTC" when not set).
Alert from {{ $workflow.name }} (run {{ $execution.id }})
$now and $today
$now is the current time and $today is midnight today, both in the workflow's time zone (set under
Workflow settings; UTC when not set). Both are DateTime values with methods
such as plus, minus, startOf, setZone, toFormat and toISO. See $dt for the full
list.
{{ $now.toISO() }}
{{ $today.toISODate() }}
{{ $now.minus({ days: 7 }).toISODate() }}
{{ $now.setZone('America/New_York').toFormat('yyyy-LL-dd HH:mm') }}
Inserted into text, they appear as ISO 8601 timestamps.
$item
Inside a Transform node's array mapping, $item is the element being mapped:
{{ $item.name.toUpperCase() }}
The expression manifest
The editor's autocomplete, picker and hover help come from the expression manifest, which lists every root,
helper and DateTime member with its signature and an example. Signed-in clients can fetch it from
GET /api/expressions/manifest.