Skip to main content
Templates let one email say something different to each person, such as their first name or the plan they’re on. Subjects, email bodies and webhook bodies are written in Liquid, where anything in {{ }} is filled in when the email sends.

Variables

Variables are the values you can drop into an email. Custom attributes sit directly on subscriber, so an attribute called company is {{ subscriber.company }}. Payload fields sit at the top level.

Conditions and fallbacks

Conditions show text only when something is true. Fallbacks fill in a value when one is missing. Both lines below say “Hey Jane”, or “Hey there” if there’s no first name:
All of Liquid’s tags and filters work, including if, unless, for, date, upcase and default.

Layouts

The layout is the frame around your email. With the default layout, write only the content (<p>, <h1>, <a>, <ul>, <img> and so on) and subscriber.dev wraps it in a centred 600px column with a system font, and a footer with the unsubscribe link and your postal address. Add class="button" to a link to show it as a button:
To use your own full template, set "layout": "none". A body that’s already a full HTML document, with <html> or <body>, is always sent as-is. Include {{ unsubscribeUrl }} in your own template. If you leave it out, an unsubscribe link is added at the bottom.