What an expression can read
Every name an expression starts with, from json and node["Name"] to trigger and secret, and how to write the path to one field.
Names an expression starts with
| Write | What it holds |
|---|---|
json | The output of the step with an edge into this node; after Start, what started the run. |
node["Get contact"] | An earlier node's output, by its name on the canvas. |
trigger | What started the run, such as trigger.body for what a webhook sent. Start in the Input pane. |
loop | Inside a loop: loop.item, loop.index (from 0), loop.count, loop.first and loop.last. |
params | What a calling flow passed, or each parameter's default. |
secret.SHOP_TOKEN | A secret, filled in at run time and never shown. |
execution, flow, workspace | This run, flow and workspace, such as flow.name or workspace.timezone. |
$macro | Now and random values: $macro.date.iso(), $macro.date.timestamp() and $macro.random.uuid(). |
The Input pane offers each of these, so you rarely type one.
What trigger holds, by kind
| Trigger | Fields |
|---|---|
| Webhook | body, headers, query, method, receivedAt, and file for a large request. See Webhooks. |
| Schedule | scheduledAt, scheduleId |
| Workspace event | type, occurredAt, subject (kind, id), event |
| Watch | item, action, key, previous, changed, diff, reason, list, detectedAt, modifiedAt |
Paths to one field
After the name, a dot before each field and square brackets around a list position.
Expression
{{ json.contact.email }}Input (json){
"contact": {
"name": "Anna de Vries",
"email": "anna@example.com"
}
}| You want | Write |
|---|---|
| A field of the step before | {{ json.email }} |
| A field inside another field | {{ json.contact.email }} |
| The first item of a list | {{ json.items[0].sku }} |
| A field of the node Get contact | {{ node["Get contact"].email }} |
How they behave
- A missing path gives
null, not an error. A function then refuses it: add a fallback,json.name ?? "". - Two or more edges into a node make
jsonnull. Name the node withnode["Name"]. - Renaming a node updates the expressions that name it.
- Inside a loop,
node["Name"]of a node in the loop is this round's output; after the loop, the last round's.
Common mistakes
- Capitals that do not match.
json.Emailis notjson.email: compare with the step's output. - Naming a node that runs later. Only earlier nodes can be read; the field shows a message until you fix it.
- Reading what a webhook sent as
jsondeeper in the flow.jsonis the step right before: writetrigger.body.