FluxyAPIFluxyAPI
BlocksVariable Blocks

Set Temporary Variable

Set or update flow-specific temporary values. These variables exist only for the duration of the flow execution.

The Set Temporary Variable block allows you to update the value of a temporary variable that was previously created in your flow. Use this block for logic like incrementing counters, adding items to a temporary list, or updating a status flag during flow execution.

Configuration

FieldRequiredDescription
VariableSelect the temporary variable to set or update. You must first create the variable using a Create Temporary Variable block earlier in your flow.
Variable OperationThe action to perform on the selected variable. Options vary based on the variable's type (e.g., Push to Front for arrays, Set Value for numbers).
String ValueThe text content to store in the variable (visible for string operations).
Number ValueThe numerical value to store (visible for number operations).
Array ValueThe item(s) to add or remove from an array (visible for array operations).
Array IndexThe zero-based position of the item to remove (visible for the Remove Value at Position operation).
ObjectThe key-value pairs to set within an object variable. Supports nested paths using dot notation.
Object PathThe path(s) to the properties you want to remove from an object.
Missing Initialization

If you attempt to use this block on a variable that hasn't been initialized by a Create Temporary Variable block, the flow will trigger a VARIABLE_NOT_INITIALIZED error.

Error Handling

  • MISSING_VARIABLE — Triggered when no variable is selected.
  • VARIABLE_NOT_FOUND — Triggered if the variable definition cannot be found.
  • VARIABLE_NOT_INITIALIZED — Triggered if the selected variable has not been created yet in the current flow.
  • INVALID_OPERATION — Triggered when the operation is incompatible with the variable's data type.
  • INVALID_INDEX — Triggered when an array index is invalid or out of bounds.
  • STRING_TOO_LONG — Triggered if the string exceeds the 2,000-character limit.
  • NUMBER_OUT_OF_RANGE — Triggered if the number exceeds the allowed range (+/- 9^50).
  • ARRAY_TOO_LARGE — Triggered if the array size exceeds 2MB.
  • OBJECT_TOO_LARGE — Triggered if the object size exceeds 2MB.
  • VAL_INVALID — Triggered when the provided value format is incorrect.
  • RUNTIME_ERROR — Triggered if an unexpected error occurs during execution.

Example: Tracking Item Counts

Suppose you are iterating through a list of orders and want to count how many are marked as "urgent".

  1. Step 1: Use a Create Temporary Variable block at the start of your flow to initialize urgent_count to 0.
  2. Step 2: Inside your loop, add a Set Temporary Variable block:
    • Variable: urgent_count
    • Variable Operation: Set Value
    • Number Value: {urgent_count} + 1 (Note: Ensure your logic evaluates the incremented value).
  3. Outcome: After the loop, the temporary variable {urgent_count} will hold the total number of urgent orders, which you can then use in a final notification block.

On this page