Update Variable Node
The Set Variable node saves information so you can use it later in your workflow. Think of it like writing something down on a sticky note so you don’t forget it.When to Use
- Remember something - Save an AI response to use in multiple places
- Collect results - Build a list of results as you loop through items
- Track progress - Keep track of counts or status
- Give things names - Create easy-to-remember names for complex data
- Save between runs - Some variables can persist even after the workflow ends
- Save different things based on conditions - Store different values depending on what happened
Example: Store Processing Results
Save LLM analysis results for use in multiple downstream nodes:Store the results
Add a Set Variable node:
- Variable name:
analysisResults - Value:
{{llm_1.response}} - Scope: execution
- Cleaner references:
{{set_variable_1.value.score}}vs{{llm_1.response.score}} - Parse JSON once, use everywhere
- Clear documentation of what data means
Example: Accumulate Loop Results
Collect results from each loop iteration:- Variable name:
processedItems - Value:
{{llm_1.response}} - Operation: append
Example: Persistent Counter
Track how many times a workflow has run: Configuration:- Variable name:
runCount - Value:
1 - Operation: increment
- Scope: application (persists between runs)
{{set_variable_1.value}}
Use this for:
- Rate limiting
- Usage tracking
- Triggering actions after N runs
Example: Conditional Storage
Store different values based on conditions:Two Ways to Save Variables
During This Run Only (Default)
Most variables only exist while your workflow is running:- Temporary calculations
- Storing results while working
- Most everyday use cases
Remember Between Runs
Some variables can be remembered even after the workflow ends:- Counting things over time
- Remembering when something last happened
- Settings that rarely change
Operations
Set (Replace)
Replace the entire value:Append (Arrays)
Add an item to an existing array:Increment (Numbers)
Add to an existing number:Merge (Objects)
Combine objects, with new values overwriting:Accessing Variables
From the Same Run
Use the Set Variable node’s output:Application Variables
Application-scoped variables can be referenced by name:Tips
Settings
What to call this node (shown on the canvas).
A short code to reference this node’s value.
What to call the variable. Use clear names like
customerEmail or totalAmount.What to save. Can be typed directly, or pulled from a previous node.
How long to keep the variable:
- execution - Only during this run (default, use this most of the time)
- application - Remember it even after the workflow ends
What to do with the value:
- set - Replace whatever was there before
- append - Add to an existing list
- increment - Add to an existing number
- merge - Combine with an existing object
Outputs
The value that was stored.
The previous value (useful for tracking changes).
The name of the variable that was set.
