Set Variable
Overview
The Set Variable integration allows you to store values within a Decimal workflow so they can be reused by downstream nodes. It helps manage workflow state, simplify data handling, and improve readability.
Common uses include storing API results, computed values, and control flags.
Module
Set Variable
Assigns a value to a named variable and makes it available to subsequent workflow steps.
When to Use Set Variable
Use this node when you need to:
Store intermediate values
Reuse data across multiple nodes
Simplify complex data paths
Maintain workflow state
Adding Set Variable to a Workflow
Open the Decimal workflow editor
Add or connect from an existing node
Select Transform → Set Variable
Connect it to the previous step
The Set Variable Settings panel opens automatically.
Configuration
Variable Name
Name of the variable to set.
Example:
myVariable
Required field.
Value
Value to assign to the variable.
Example:
100
Required field.
Value Type
Select the data type of the value:
String
Number
Boolean
JSON
Choosing the correct type ensures proper usage downstream.
Output
The variable is stored in the workflow context and can be referenced by later nodes using its name.
Example Use Case
Use Case: Store a computed value for reuse.
Workflow:
Trigger
Run Code (compute a value)
Set Variable (store the result)
Use the variable in later nodes
Last updated
Was this helpful?