Skip to main content
Template Blocks let you write custom HTML, CSS, and Handlebars directly in your email notifications. Use them for dynamic, richly formatted content that goes beyond what the visual block types offer.
Plain TextPlain text preview is not supported for template blocks at this time. Anything created with template blocks will not render as plain text in emails.
Template Block Boilerplate
Email Client SupportHTML and CSS support varies by email client.

Handlebars Templating Language

The Template Block supports Handlebars. You can learn about the language syntax from the Handlebars Language Guide. Read more: Custom Courier Handlebars helpers.

Styling with CSS and Handlebars

Combine CSS and Handlebars for dynamic styling:
Template Block with CSS and Handlebars

Using Markdown in a Template Block

Render markdown between {{#markdown}} and {{/markdown}} within a template block.
<div>
{{#markdown}}
  # Your Markdown Content

  - List item 1
  - List item 2
{{/markdown}}
</div>

Using Replacement Variables in Handlebars

Insert variables from your JSON event data:
{{var "variable_name"}}

Inserting HTML from Variables

To render HTML stored in a variable, use triple curly braces:
{{{htmlContent}}}

Using Brand Snippets

You can reference Brand Snippets in template blocks using Handlebars partial syntax. This is useful for shared components like footers, disclaimers, or promotional banners:
{{>legal_footer}}