Variables and loops
Workflow-level variables, the Change Variable node, the Loop node, and the Wait node.
Most non-trivial automations need three primitives beyond the linear execution chain: variables, loops, and waits.
Variables
Each automation can declare workflow-level variables. They live in the Variables tab of the left panel.
A variable has (from
src/components/canvas/shared/CreateVariablePanel.jsx):
- Name — must be unique within the automation
- Folder — for grouping in the picker
- Type — one of seven:
text,number,boolean,object,array,date,image - Description — shows up in hover help
- Default value — initial value before any Change Variable node fires
- Current value — what the variable is right now (shown live during test runs)
- Toggles for preserveOnNav (keep value when navigating away) and saveToStorage (persist across sessions)
Reference any variable in any bindable input with {{name}} via the
ƒ binding modal's Variables tab.
Change Variable node
Use the Change Variable node anywhere in the graph to set a variable's value:
- Variable — searchable dropdown of all workflow variables
- Value — direct input or a binding (
{{Prompt.output.text}}, a formula, etc.)
You can chain multiple Change Variable nodes to set several vars in sequence.
Loop node
The Loop node (src/components/canvas/automation/nodes/LoopNode.jsx)
iterates over an array. In the inspector:
- Iterations — how many times to loop (number or bound expression)
- Condition — optional exit condition evaluated each iteration
The loop runs over the connected sub-graph downstream of the Loop node; there's no explicit "Loop End" marker — the loop scope is the connected subtree.
Wait node
The Wait node (WaitNode.jsx) pauses the workflow for a fixed
duration. Available units:
ms— millisecondssecondsminutes
(There is no hours option today — use minutes if you need longer
pauses.)
Use waits for rate limiting, debouncing, or spacing out outbound API calls.
Composing them
A typical campaign-send automation:
- Search the People table for opted-in contacts with a target tag.
- Loop over the result.
- Inside the loop: a Tool Call node sends an SMS via Telnyx.
- A Wait node spaces sends out (e.g. 500 ms each) to respect rate limits.
- A Change Variable node increments a counter.
- After the loop: a Response node summarizes the run.