FluxyAPIFluxyAPI
BlocksVariable Blocks

Create Temporary Variable

Initialize flow-specific temporary values that do not persist after the flow execution ends.

The Create Temporary Variable block is used to initialize variables that are only needed for the duration of a single flow execution. These variables are stored in memory and are discarded once the flow completes, making them ideal for intermediate calculations, loops, or storing temporary request data.

Configuration

FieldRequiredDescription
Variable NameThe unique identifier for the variable (e.g., counter, results). Names must follow the project's variable naming rules (letters and numbers only).
Variable TypeSelect the data type for the variable: String, Number, Array, or Object.
ValueThe initial value to assign to the variable. The input field will change based on the selected Variable Type.
Temporary vs. Persistent

Unlike Set Variable (which saves to the database), variables created with this block only exist while the flow is running. If you need to access data in a different flow tomorrow, use the Set Variable block instead.

Initialization

It is best practice to use this block at the beginning of your flow to define all the temporary variables you'll need.

Error Handling

  • FIELD_MISSING — Triggered if the Variable Name or Type is not provided.
  • INVALID_TYPE — Triggered if an unsupported variable type is selected.
  • STRING_TOO_LONG — Triggered if the initial string value exceeds 2,000 characters.
  • NUMBER_OUT_OF_RANGE — Triggered if the number is outside the allowed range.
  • ARRAY_TOO_LARGE — Triggered if the initial array exceeds 2MB.
  • OBJECT_TOO_LARGE — Triggered if the initial object exceeds 2MB.
  • RUNTIME_ERROR — Triggered if an unexpected internal error occurs during variable creation.

Example: Initializing a Loop Counter

If you are building a flow that processes a list of items, you might need a counter to track your progress.

  1. Add a Create Temporary Variable Block:
    • Variable Name: loop_index
    • Variable Type: Number
    • Value: 0
  2. Usage: You can now reference this counter in subsequent blocks using {loop_index}.
  3. Updating: Use the Set Temporary Variable block to increment this value within your loop.

On this page