Variables + substitution
The platform’s substitution syntax — used everywhere from text bodies to HTTP request URLs, AI prompts, broadcast templates, and template button parameters.
Syntax
{{contact.first_name}} ← per-contact attribute (reserved or custom)
{{account.tier}} ← linked account's attribute
{{agency.signature}} ← workspace-wide attribute
{{run.otp_code}} ← variable saved earlier in THIS flow run
{{contact.first_name | "friend"}} ← fallback when missing or blankScopes in detail
| Scope | Source | Notes |
|---|---|---|
contact | ContactProfile.attributes (JSONB) | Reserved + custom fields |
account | Account.attributes (linked B2B account) | Empty when no account linked |
agency | AgencyAttributes.attributes | Workspace-wide |
run | FlowState.runVars | Lives only for this run; not persisted unless save_to was a custom field |
Where it’s applied
- Text blocks — body
- Reply buttons — body, button titles (use sparingly; Meta enforces a 20-char cap)
- Templates — body parameters, header text, URL button variables
- User-input — question + retry message
- HTTP request — URL, headers, query params, body, auth fields
- AI reply — system prompt + user prompt
- Broadcasts — body / template params
- Drips — each step’s body / params
- Booking event summary + description
Authoring autocomplete
Inside any of the above text fields, type {{ → a popover appears with every custom
field grouped by scope, plus a + Create custom field shortcut that opens an inline
dialog to define a new one. Arrow keys + Enter to insert; Esc to dismiss.
What’s NOT supported
Not a full template engine — just {{scope.key}} and {{scope.key | "default"}}.
No conditionals, loops, math, function calls. For dynamic content, branch with
flow_if blocks or compute server-side via http_request and stash the result in
a run variable.
Last updated on