Skip to main content
Placeholders use the syntax {{path.to.data}} and are replaced with actual values when the template is compiled with data. Think of them as variables that get filled with real information each time you send a message.

Prerequisites

  • Completed Quickstart
  • Basic understanding of JSON

Basic syntax

Simple variables

With data:
Renders as: Hello Sarah!

Object properties

Use dot notation for nested properties:
With data:

Array elements by index

With data:

Looping with directives

For dynamic lists, use the #each directive (see Directives):
Inside the loop, this refers to the current item. Use @index for the 0-based index (e.g. Task {{@index + 1}}: {{this.title}}).

Common patterns

User information:
Order data:
Dates: Pre-format dates in your data (e.g. "January 15, 2025") and reference them: Created: {{task.created_at}}.
Do calculations and conditional logic before template compilation. Pass ready-to-display values (e.g. status_message: "✅ Approved") and reference them in the template.

Best practices

  • Use descriptive names: {{user.email}} not {{e}}
  • Match placeholder paths to your sample data structure
  • Avoid double dots or typos: {{user..name}} will fail

Next steps

Directives

Generate repeating blocks with #each and conditionals.

Block types

Use placeholders inside blocks.