Skip to content

Variables

Accessible throughout the flow. Persist across the entire execution.

Defined at flow entry. The start node populates these from the trigger payload.

Captured by the end node and returned as the flow result.

{
"variables": {
"global": {
"counter": {
"name": "counter",
"type": "number",
"defaultValue": 0,
"description": "Iteration counter",
"required": false
}
},
"inputs": {
"input": {
"name": "input",
"type": "string",
"description": "User input text",
"required": true
}
},
"outputs": {
"output": {
"name": "output",
"type": "string",
"description": "Agent response"
}
}
}
}
TypeDescription
stringText value
numberNumeric value
booleanTrue/false
objectJSON object
arrayJSON array
anyAny type

Use {{variable}} syntax to reference variables in node configurations:

{{input.message}} — Input variable
{{agent-1.output}} — Output from a specific node
{{state.counter}} — Global state variable
{{credentials.api_key}} — Credential reference
{{item.title}} — Current item in map_reduce

Use set_state nodes to update global variables during execution:

{
"type": "set_state",
"data": {
"type": "set_state",
"assignments": [
{ "key": "counter", "value": "{{state.counter}} + 1" },
{ "key": "lastResult", "value": "{{agent-1.output}}" }
]
}
}