Skip to main content
Every workflow execution maintains data in four organized namespaces. This data flows between nodes, gets updated by user interactions, and drives workflow logic.

Data structure

vars namespace - User-defined variables
  • Read/write access
  • Store custom data, user responses, API results
  • Persists throughout workflow execution
system namespace - System-managed data
  • Read-only access
  • Workflow metadata, timing, execution details
  • Automatically maintained by the platform
context namespace - Contextual information
  • Mostly read-only (set at workflow start)
  • Channel info, user details, trigger context
  • Provides execution environment details
metadata namespace - Request metadata
  • Read-only access
  • API request details, timestamps, caller info
  • Available for API-triggered workflows

Initial data

WhatsApp trigger workflow starts with:
API trigger workflow starts with:
WhatsApp event trigger workflow starts with:
When phone_number_id is provided in the API request:
  • Automatically stored in {{system.trigger_whatsapp_config_id}}
  • Phone number normalized and stored in {{context.phone_number}}
  • Guarantees all messages use the same WhatsApp configuration

Accessing variables

Use {{variable_name}} syntax in messages, templates, and AI fields to access variables. Direct access (looks in vars namespace):
Explicit namespace access:

Resume tracking

After a workflow resumes from a wait step, these system variables are available:
Use {{system.last_resume.reason}} to detect if a wait step timed out:
While a wait step with timeout is active, these variables are available:

Data flow between nodes

Send nodes (SendTextNode, SendTemplateNode, SendInteractiveNode)
  • Read: All variables for message content and parameters
  • Write: Nothing
Wait for response node
  • Read: Nothing (just waits)
  • Write: Sets {{last_user_input}} when user responds (not set on timeout). Sets {{system.last_resume}} metadata on resume. Sets {{system.pending_timeout}} when timeout is scheduled
Decide node
  • Read: All variables to evaluate conditions
  • Write: Nothing (just routes workflow)
Function node
  • Read: Sends entire execution context to function
  • Write: Can set variables via save_response_to or function return
Agent node
  • Read: Full access to all variables via get_variable tool
  • Write: Can set any variable via save_variable tool
Handoff node
  • Read: Nothing
  • Write: Nothing (just stops execution)

Variable naming

  • Use lowercase with underscores: user_name, order_total
  • Be descriptive: last_user_input not input
  • Avoid system reserved names: flow_id, started_at

Environment variables

Store sensitive values like API keys as environment variables. They use a distinct syntax to avoid conflicts with workflow variables. Syntax: ${ENV:VARIABLE_NAME} Each variable has two values:
  • Development: Used during test runs
  • Production: Baked into published workflows

Scopes

Project-level — Available across all workflows in the project. Access: Project Settings → Environment variables (or click the key icon in the workflow canvas toolbar). Flow-level — Scoped to a single workflow. Flow-level variables override project-level variables with the same key. Access: Workflow Settings → Environment variables.

Example usage

In webhook URLs:
In agent MCP headers:

Key differences from workflow variables