Set Variable Integration

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

  1. Open the Decimal workflow editor

  2. Add or connect from an existing node

  3. Select Transform → Set Variable

  4. 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:

  1. Trigger

  2. Run Code (compute a value)

  3. Set Variable (store the result)

  4. Use the variable in later nodes

Last updated