Node Details

  • Name: SetVariable

  • Type: SetVariable_Utilities

  • Version: 2.0

  • Category: Utilities

Input Parameters

  1. Input

    • Label: Input

    • Type: string | number | boolean | json | array

    • Optional: true

    • List: true

    • Description: The value to be stored in the variable. Can be of various types.

  2. Variable Name

    • Label: Variable Name

    • Type: string

    • Placeholder: var1

    • Description: The name of the variable to be set.

Outputs

  1. Output

    • Label: Output

    • Base Classes: string, number, boolean, json, array

    • Description: The same value as the input, passed through for further use in the workflow.

Functionality

  1. The node accepts an input of various types (string, number, boolean, JSON, or array).

  2. If the input is an array with a single element, it extracts that element.

  3. The node sets a dynamic variable with the name specified in the “Variable Name” input.

  4. The input value is both set as the dynamic variable and passed through as the output.

Use Cases

  • Storing intermediate results in a workflow

  • Passing data between different stages of a process

  • Temporarily holding user input or API responses

  • Creating named variables for complex workflows

Notes

  • The variable set by this node is only available during runtime and within the current workflow execution.

  • This node is particularly useful in scenarios where data needs to be stored temporarily and accessed by multiple nodes in a workflow.

  • The ability to handle various data types makes this node versatile for different kinds of workflows and data processing tasks.