Skip to main content
The Set Variable node assigns a value to a named variable. The value can be a static string or a computed expression.

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.SUCCESS on completion or SET_VARIABLE.ERROR on failure

Configuration

ParameterTypeDefaultOptionsDescription
variableNamestring""Name of the variable to set
sourceenum"static"static, expressionHow the value is determined
valuestring""Static value (used when source is static)
expressionstring""Expression to evaluate (used when source is expression)

Source types

SourceDescription
staticSet the variable to a literal string value
expressionEvaluate an expression (e.g., concatenation, arithmetic, or referencing other variables)

Output handles

HandleDescription
SuccessVariable set successfully
ErrorFailed to set variable (e.g., invalid expression)

Use cases

Set language to "en" at the start of the flow. Override it later based on caller input.
Use expression source to combine variables: set greeting to "Hello, " + {{customer_name}}.
Set a status variable at different points in the flow (e.g., "verified", "transferred") for use in API calls or logging.