Syntax
Wrap a variable in double curly braces anywhere a field accepts text:{{params.id}}. Click the variable button next to a field to see the variables that are available there and insert one without typing.
There are five roots:
After the root you can read nested values with
.field and list items with [index]:
output[0] doesn’t exist, the variable is simply empty.
Whole value or inside text
How a variable is used depends on whether it is the entire field or part of a longer text:
In URL fields, variables that come after other text are URL-encoded automatically. With
https://api.example.com/search?q={{params.query}}, a query like red shoes becomes red%20shoes.
In JSON body fields, put variables inside string values. A value that is only a variable keeps its original type:
age is sent as a number and tags as an array when the source values have those types.
Rules
- A step can only use the output of a step that runs before it, meaning a step connected earlier in the chain. Otherwise the field shows
Step <id> must run before this step. - Referencing a step that doesn’t exist shows
Step <id> does not exist. - Any other text inside
{{ }}showsUnknown variable {{...}}. Onlyparams,env,loop,nodes.<id>.outputandnodes.<id>.errorare allowed; there are no functions or operators inside variables. loop.itemandloop.indexonly work inside a For Each body, andnodes.<id>.erroronly on the error branch of that step.- Prefer secret fields such as Bearer token secret or the Database step credentials over
{{env.KEY}}in free text, so secrets never appear in URLs or logs by accident.
Loop variables
Inside a For Each body you can read the current item:
In the body,
{{nodes.<body-step>.output}} is the output for the current item. After the loop, {{nodes.<for-each-id>.output}} holds the list of results, one per item.
Error variables
On the error branch of a step, read why it failed:status is only set for HTTP Request steps. On the error branch, {{nodes.<id>.output}} of the failed step is empty.
Query parameters
The HTTP Request step has a Query parameters list next to the URL. Each row is a name and a value, and values can contain variables. Rows whose value ends up empty are left out of the URL, so optional tool parameters that the AI does not send don’t produce?status=&limit=.