FlowmageDocs

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

WriteWhat it holds
jsonThe 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.
triggerWhat started the run, such as trigger.body for what a webhook sent. Start in the Input pane.
loopInside a loop: loop.item, loop.index (from 0), loop.count, loop.first and loop.last.
paramsWhat a calling flow passed, or each parameter's default.
secret.SHOP_TOKENA secret, filled in at run time and never shown.
execution, flow, workspaceThis run, flow and workspace, such as flow.name or workspace.timezone.
$macroNow 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
TriggerFields
Webhookbody, headers, query, method, receivedAt, and file for a large request. See Webhooks.
SchedulescheduledAt, scheduleId
Workspace eventtype, occurredAt, subject (kind, id), event
Watchitem, 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 wantWrite
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 json null. Name the node with node["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.Email is not json.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 json deeper in the flow. json is the step right before: write trigger.body.