Skip to main content

Set Flow Variable

The Set Flow Variable effect assigns a new value to a variable that is scoped to the current flow. The variable must already be defined in the flow's variable panel before you can use this node. Flow variables are reset each time the flow starts -- they do not persist between executions.

Use flow variables to store intermediate state within a single flow execution, such as counters, flags, or accumulated text.

Inputs

NameTypeDescription
Valuestring, number, or booleanThe new value to assign to the variable. The type must match the variable's defined type.

Configuration

  • Variable: Select which flow variable to set from the dropdown list of variables defined in the flow's variable panel.

Example

Build a flow that counts how many viewers have used a !join command during the current execution. Define a number variable called count in the variable panel (defaulting to 0). Each time the Chat Command trigger fires, use a Math node to add 1 to the current count, then pass the result to a Set Flow Variable effect to update count.