Skip to main content
Flow variables are named inputs the Flow declares. Blocks interpolate them via {{name}}. Runtime callers set values (via the API payload, the chat UI, or a schedule). Variables give one place to declare inputs and one place to interpolate them.

Commands

Variable name is a positional argument, e.g. topic, customer_email.

vars list

Prints all declared variables, one per row: name, type, source, required, default. Add --json for structured output.

vars set

Flags

Only the flags you pass update the existing variable — a set is a shallow merge, not a replace. To reset a field, delete and re-create the variable.

Sources explained

  • form — surfaced in the chat trigger’s form UI. User fills it in.
  • body_path — extracted from the request body at a JSON path (webhook and API triggers). Use --path to specify.
  • fixed — hard-coded. Same value every run. Useful for constants and feature flags.

vars delete

Removes the declaration. Blocks that reference {{customer_email}} will fail at run time — audit those first.

Common recipes

Declare a required user input

Shows in the chat trigger form as a required field.

Extract from a webhook body

If your webhook posts { "customer": { "email": "..." } }:
Blocks then interpolate {{customer_email}} and see the extracted value.

A feature-flag switch

Flip it via another vars set --fixed-value true when you’re ready. No block edits, no republish (settings-scope changes are live immediately).

Bulk snapshot & restore

Because vars list --json is structured, you can persist vars in git and re-apply on another workspace:
For non-trivial bulk migration, flows snapshot/apply carries variables along.

Where variables show up

  • Block content — anywhere a text field accepts {{name}} interpolation.
  • Trigger inputs — webhook input_path maps into a variable; API triggers accept them.
  • Chat form UI--source form variables render as fields at run start.
  • Schedule triggers--source fixed values are baked into every scheduled run.

Variable and version scope

Variables belong to the Flow (draft + published together). Renaming a variable is a Draft edit — publish to make it live. --fixed-value changes take effect immediately without republishing.