Access is invite-only during beta. Once invited, create a key to personalize these examples. Production sending requires a separate review.
Liquid
Variables, filters, if, and for.
Templates use the Liquid gem. Write tags in subject, HTML, text, and CSS. Pass a JSON object as template.variables when you send. The dashboard Variables pane is the same shape.
Missing variables render as empty. Use | default when you want a fallback.
Variables
Nested keys work:
{{ name }} is replaced as written. Escape in your application if the value is untrusted, or use | escape. Use values that are already HTML when you want markup in the body.
Filters
Common filters:
| Filter | Example |
|---|---|
default |
{{ name | default: "there" }} |
upcase / downcase / capitalize |
{{ name | upcase }} |
escape |
{{ name | escape }} |
date |
{{ created_at | date: "%b %-d, %Y" }} |
truncate |
{{ body | truncate: 80 }} |
join |
{{ tags | join: ", " }} |
Conditions
{% for item in items %}{{ item }}{% endfor %} works when items is an array of strings.