Skip to main content
The content and the subject take variables between double braces, and a small language of conditions and loops. No code is run: the engine understands only what is described here. The Variables button of each editor lists the ones available; one click copies a variable.

Variables

In campaigns and automations

In the confirmation and welcome e-mails

The same subscriber and list variables, plus {{ confirm_url }}, the confirmation link.

In transactional e-mails

The variables are the ones your application sends. With:
you write {{ customer.name }} and {{ order.number }}. See Transactional e-mails through the API.
A variable that is unknown or empty is replaced with an empty string. Values are escaped in the HTML: a first name holding <script> is shown as it is, and does not run.

Conditions

The language is Liquid, the one Shopify and many others use: what you know from there works here.
A contact field is read by its key, under attributes: {{ subscriber.attributes.plan }}. A field of type number compares as a number, a date can be written with date.

Filters

A filter changes a value on its way out. They chain, left to right.
A filter that does not exist stops the e-mail from being rendered, and the preview says which one: better an e-mail not sent than one sent broken. A variable that does not exist is simply empty.

Loops

A loop runs over a list of plain values (["Sourdough bread", "Brioche"]) or over a list of objects ([{"name": "Bread", "quantity": 2}]), whose fields are read with a dot. forloop.first, forloop.last and forloop.index say where the loop is; {% for item in items limit: 3 %} stops early.

What an event brings

In an automation started by something the person did, the e-mails read that event: {{ event.name }}, {{ event.value }}, {{ event.currency }}, and every property it was sent with, directly under event — {{ event.url }}, {{ event.total }}, {% for item in event.items %}. See Events.

Two variables you cannot leave out

A campaign does not go out without:
  • {{ unsubscribe_url }}: a visible unsubscribe link;
  • {{ organisation.address }} (or the address written out in full): the sender’s postal address.
Both are legal requirements for any marketing e-mail. The simplest thing is to put them in your template.