Skip to content
Last updated

A Workflow Variable is a named placeholder scoped to a single Workflow automation. You set or capture its value in one node and reference it later as {VARIABLE_NAME} in any interpolable text field of the same workflow.

Workflow variables are scoped to one Workflow. They are not visible to other workflows and not shared with Flow Variables, which live on Agents.

Identity

FieldTypeNotes
idnumberUse as variableId.
namestringSnake-case by convention. Used inside {NAME} interpolation tags.
descriptionstring?
statusenumACTIVE · INACTIVE · ARCHIVED.
patternstring?Optional regex pattern. Used to validate captured values.
defaultValuestring?Value used when the variable has not been set yet.
isDefaultbooleantrue for variables that ship with the platform.
automationIdnumberOwning workflow.
createdAtstringISO timestamp.
updatedAtstringISO timestamp.

Where they interpolate

Reference variables as {VARIABLE_NAME} in any interpolable text field. The name must match exactly, including case.

Interpolable fields inside a Workflow include everything available to Flow Variables, plus:

  • AI Capture: prompt, instructions
  • Data Transformer: prompt
  • Tools AI: instructions, prompt
  • Transcription: audioUrl
  • Send Message / WhatsApp template variables: templateVariables.header, templateVariables.body, templateVariables.buttons

Implicit runtime variables

In addition to the variables you declare, every node automatically exposes a runtime variable equal to its nodeId. A node with nodeId = "api_1" is referenceable later as {api_1}. These do not appear in this resource — they are implicit.

This is the Workflow-only shortcut: in Flows you must declare a variable to carry a value forward; in Workflows you can chain nodes directly via {nodeId}.

Naming

  • Use snake_case (e.g. order_id, customer_email).
  • Must be unique within the workflow. Use the check-name endpoint to test availability before creating.
  • Reserved: don't shadow a nodeId of another node in the same graph.

Operations

VerbPath
GET/public/v1/workflows/{workflowId}/variables
POST/public/v1/workflows/{workflowId}/variables
GET/public/v1/workflows/{workflowId}/variables/{variableId}
PUT/public/v1/workflows/{workflowId}/variables/{variableId}
DELETE/public/v1/workflows/{workflowId}/variables/{variableId}
GET/public/v1/workflows/{workflowId}/variables/all
GET/public/v1/workflows/{workflowId}/variables/check-name?name=...

All endpoints require a USER API key. Full details under the Workflow Variables tag in the API Reference.

CLI

frontline workflows variables list --table
frontline workflows variables create --name order_id --description "Order ID" --pattern "^[0-9]+$"
frontline workflows variables check-name order_id
frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"