Behavior
- Sets the named variable to the configured value
- Supports both static values and dynamic expressions
- The variable is available to all downstream nodes via
{{variableName}} - Emits
SET_VARIABLE.SUCCESSon completion orSET_VARIABLE.ERRORon failure
Configuration
| Parameter | Type | Default | Options | Description |
|---|---|---|---|---|
variableName | string | "" | — | Name of the variable to set |
source | enum | "static" | static, expression | How the value is determined |
value | string | "" | — | Static value (used when source is static) |
expression | string | "" | — | Expression to evaluate (used when source is expression) |
Source types
| Source | Description |
|---|---|
static | Set the variable to a literal string value |
expression | Evaluate an expression (e.g., concatenation, arithmetic, or referencing other variables) |
Output handles
| Handle | Description |
|---|---|
| Success | Variable set successfully |
| Error | Failed to set variable (e.g., invalid expression) |
Use cases
Default values
Default values
Set
language to "en" at the start of the flow. Override it later based on caller input.Computed values
Computed values
Use
expression source to combine variables: set greeting to "Hello, " + {{customer_name}}.Flow state tracking
Flow state tracking
Set a
status variable at different points in the flow (e.g., "verified", "transferred") for use in API calls or logging.