Connect
Variables
Personalize messages with data from webhooks, API calls, earlier answers and AI agents.
Syntax at a glance#
| Write | Inserts | Where it comes from |
|---|---|---|
{{#path.to.field}} | A field from incoming data, at any depth | Catch Hook data, HTTP GET responses |
{{#items[0].sku}} | One item of a list | Same, with the index in brackets |
#key | A top-level field (shorthand) | Same |
{{@step_name}} | The customer's answer to a step | Earlier Chat Builder steps |
#cphone, #channel, #now | System values | Officely |
{{AgentName.field}} | A schema field from an AI step | AI Flows |
In the editor, type # or @ in a message to pick a variable from a list.
Data from Catch Hook and HTTP#
Suppose your system sends this data with a Catch Hook request:
{
"order": {
"id": "3234379",
"items": [{ "sku": "TSHIRT-M", "qty": 2 }]
},
"customer": { "name": "Noa" },
"coupon": "SPRING10"
}Use dots for nested fields and brackets for list items:
Hi {{#customer.name}}! Order {{#order.id}} has shipped.
First item: {{#order.items[0].sku}} x {{#order.items[0].qty}}
Your next-order code: #couponThe customer receives: Hi Noa! Order 3234379 has shipped. First item: TSHIRT-M x 2. Your next-order code: SPRING10.
An HTTP GET step works the same way: the fields of its response (or of its data field, if it has one) become variables for the rest of the conversation.
System variables#
| Variable | Value |
|---|---|
#cphone | The customer's phone number |
#channel | The channel the conversation is on: meta (official API), green (QR), web (website widget) or tapi (legacy connection) |
#now | The current date and time, as dd/mm/yyyy hh:mm |
Answers from earlier steps#
Every step that waits for a reply stores the answer under the step's name. Insert it with {{@step_name}} (or the shorthand @step_name):
Thanks {{@full_name}}! We'll email {{@email}} within one business day.Answers are also sent to your systems by HTTP steps, so you can save a lead to your CRM at the end of a flow.
AI flow variables#
Inside an AI flow, steps reference each other by name in double braces:
| Write | Inserts |
|---|---|
{{AgentName}} | The full output of a step |
{{AgentName.field}} | One field of a step that answers with a schema |
{{Knowledge.context}} | The passages a Knowledge step found |
{{question}} | The customer's latest message |
{{chat_history}} | The conversation so far |
Use only this context to answer:
{{Knowledge.context}}
The customer asked: {{question}}
Detected intent: {{Classify.intent}}Type @ in a prompt to pick from the available fields. If a referenced variable doesn't exist when the step runs, the step stops with a Missing placeholders error, so check names after renaming a step.