Data structure
vars
namespace - User-defined variables
- Read/write access
- Store custom data, user responses, API results
- Persists throughout flow execution
system
namespace - System-managed data
- Read-only access
- Flow metadata, timing, execution details
- Automatically maintained by the platform
context
namespace - Contextual information
- Mostly read-only (set at flow 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 flows
Initial data
WhatsApp trigger flow starts with:whatsapp_config_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
In messages and templates:Modifying variables
Wait for response node:Data flow between nodes
Send nodes (SendTextNode, SendTemplateNode, SendInteractiveNode)- Read: All variables for message content and parameters
- Write: Nothing
- Read: Nothing (just waits)
- Write: Sets
{{last_user_input}}
when user responds
- Read: All variables to evaluate conditions
- Write: Nothing (just routes flow)
- Read: Sends entire execution context to function
- Write: Can set variables via
save_response_to
or function return
- Read: Full access to all variables via
get_variable
tool - Write: Can set any variable via
save_variable
tool
- Read: Nothing
- Write: Nothing (just stops execution)
Examples
Using contact data:Variable naming
- Use lowercase with underscores:
user_name
,order_total
- Be descriptive:
last_user_input
notinput
- Avoid system reserved names:
flow_id
,started_at