Template Variables
Personalize messages and notifications with dynamic variables like member names and form data.
Template Variables
Personalize messages, notifications, and other content with dynamic variables.
Basic Syntax
Use double curly braces: {{variable.property}}
Hello {{member.first_name}}, welcome! I'm {{assistant.name}}.
Available Variables
Member
| Variable | Example |
|---|---|
{{member.first_name}} | "Jane" |
{{member.name}} | "Jane Smith" |
{{member.email}} | "jane@example.com" |
{{member.phone}} | "+1 555 123-4567" |
Member Form Data
Access data type fields by slug and field name:
{{member.data.contact_info.emergency_contact}}
{{member.data.profile.company_name}}
Member Collections
Access collection data types with count, latest record, and recent records:
{{member.collections.patient_visits.count}}
{{member.collections.patient_visits.latest.data.diagnosis}}
{{member.collections.patient_visits.latest.created_at}}
{{member.collections.lab_results.latest.data.result}}
Loop through recent records:
{% for visit in member.collections.patient_visits.recent %}
- {{visit.data.diagnosis}} ({{visit.created_at}})
{% endfor %}
Tip:
{{member.data.<collection>.<field>}}also works for collections but returns a non-deterministic record when multiple exist. Usemember.collectionsfor reliable, structured access.
Assistant (Agent in the assistant role)
The assistant variable refers to the AI agent assigned to the current workflow or task — the agent acting in the assistant role for this conversation.
| Variable | Example |
|---|---|
{{assistant.name}} | "Support Bot" |
{{assistant.first_name}} | "Support" |
Task
| Variable | Example |
|---|---|
{{task.name}} | "Customer Onboarding" |
{{task.description}} | "Complete setup" |
Chat
| Variable | Example |
|---|---|
{{chat.id}} | "cht_987654321" |
Record (in data record events)
| Variable | Example |
|---|---|
{{record.id}} | "12345" |
{{record.data.field_slug}} | Field value |
{{record.owner.name}} | "Jane Smith" |
Examples
Simple greeting
Hi {{member.first_name}}, thanks for reaching out!
With form data
Your order for {{member.data.order.product_name}} is confirmed.
Shipping to: {{member.data.shipping.address}}
Conditional content
{% if member.data.profile.company %}
Company: {{member.data.profile.company}}
{% endif %}
Tips
- Test first - Preview templates before using in production
- Handle missing data - Use
{% if %}for optional fields - Use snake_case - All variable names use
snake_caseformat
Related
- Actions — Use template variables in automated notifications
- CEL Expressions — Write dynamic conditions using similar variables
- Forms — Define the data types that template variables access
Related Resources
Toolkits
Create custom tools and integrate external services for your AI workflows.
Healthcare MCP Integration Examples
Healthcare-specific examples for connecting EHR systems, scheduling, lab results, pharmacy, and clinical decision support via MCP and custom toolkits.
Webhooks
Send encrypted data to external systems when events happen in your workspace.
All Guides
Browse all available guides