Set Variable Block
Set Variable writes to a named variable using operations such as set, append, increment, decrement, or merge.
At a glance
What it does
Set Variable changes a variable value after the Flow has started. It is different from Variables, which defines values near the start of a Flow.
Use it when a later step needs an updated value or accumulator.
Use it when
- Set a variable from a literal value or another variable.
- Increment a counter.
- Merge a shallow object with updated fields.
Do not use it when
- You only need initial values; use Variables.
- You need a list accumulator with duplicate handling; use Collect.
- You need to transform multiple fields in an object; use Edit Fields.
Settings
Set Variable requires the target variable name, an operation, and the value or source data for that operation.
Variable name
Required: Yes- Variables
- Variable name
- Description
- Variable to create or update.
Operation
Required: Yes- Variables
- No
- Description
- Set, append, increment, decrement, or merge.
Value
Required: Depends on operation- Variables
- Yes
- Description
- Input value used by the selected operation.
Outputs
Set Variable writes the updated value to the target variable name.
{{variableName}}anyThe updated variable value.
Example Flow
Use Set Variable after a condition or extraction when the Flow needs to update a value before continuing.
- Create or read an initial value.
- Update it with Set Variable.
- Use the updated variable in a later Block.
Errors and fixes
Start with symptoms visible in the editor or Inspector, then check the earliest Block that produced the wrong page state, variable, or output.
The resulting value is not what you expected.
- Check
- Check the selected operation and the input value type.
- Fix
- Use the operation that matches the data shape or switch to Collect/Edit Fields.
Local and cloud runs produce different values.
- Check
- Set Variable has known append and increment/decrement parity differences.
- Fix
- Verify the runtime behavior before relying on those operations in production Flows.
Local and cloud runs
Set, append, increment, decrement, and merge exist in both runtimes, but append and numeric update behavior has known local/cloud drift.