Workflows
Variable
Declare a named, typed value that every later node can read as {{ variables.<name> }}.
The Variable node (variable) sets a run-scoped variable. Every node after it can read the value as {{ variables.<name> }}, wherever it is in the graph — no need to wire an edge from the Variable node to the node that reads it.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
name | string | '' | The variable's name, read as {{ variables.<name> }}. |
type | string | number | boolean | object | string | What the value is converted to. |
initialValue | string | '' | The value, as text or a {{ }} expression. It is converted to type: "42" becomes the number 42, "true" the boolean, JSON text an object. |
A later Variable node with the same name overwrites the value from that point on. Inside a Loop body, a write lasts for that iteration only.
Output
| Field | Type | Description |
|---|---|---|
value | the declared type | The value, converted to the declared type. |
Prefer {{ variables.<name> }} over {{ upstream.<id>.output.value }}: it does not depend on which node set it.
Limits and errors
- A value that cannot be converted to the declared type —
"abc"as a number — fails the node. - Reading
{{ variables.<name> }}before any Variable node has set it fails the node that reads it, naming the variable.
Example
name: Tag priority
description: Marks a ticket as urgent when it says so.
graph:
nodes:
- id: ticket
type: trigger_http
position: { x: 0, y: 0 }
data:
method: POST
fields:
- { name: urgent, type: boolean, required: true }
- id: priority
type: variable
position: { x: 280, y: 0 }
data:
name: urgent
type: boolean
initialValue: '{{ trigger.body.urgent }}'
edges:
- { id: ticket-to-priority, source: ticket, target: priority }In a Package
- Travels:
name,type,initialValue - Converted: none
- Never carried: none