Brevo Template Language allows you to dynamically personalize your email templates. Drop a contact attribute placeholder into your email to pull in contact-specific data and personalize a single email for multiple contacts. Go even further by inserting dynamic content into your emails to manage the display of content based on predefined conditions, all within the same email.
❓What is Brevo Template language?
Brevo Template Language allows you to insert placeholders into your email templates that are replaced by contact-specific data at the time the email is sent. More than just substitutions of text, our Template Language also supports conditions, loops, and filters.
🏷️ Placeholders
Placeholders (also called variables or merge tags) are tags that are added in your email templates and replaced with contact-specific data when the email is sent. This data can be the name, address, or even favorite color of your contact, the products they purchased, an unsubscription link, etc.
There are 3 types of placeholders in Brevo Template Language:
Contact attributes
The most commonly used placeholders are contact attributes placeholders, which allow you to dynamically include stored information about your recipients into your emails:
{{contact.FIRSTNAME}}
{{contact.EMAIL}}
{{contact.MANAGER}}
It can be their name, email address, or any custom contact attribute you've stored in your contact list.
➡️ Dedicated article: Customize your emails using contact attributes
Predefined placeholders
Predefined placeholders are available for all Brevo users, such as a mirror link, unsubscribe link, and update profile form link:
-
{{mirror}}
("View in browser" link) {{unsubscribe}}
{{update_profile}}
These placeholders are usually automatically added to your templates when you create them.
➡️ Dedicated articles:
- Insert a mirror link and unsubscribe link in your campaigns
- Update your subscribers details and preferences (Update Profile form)
Transactional parameters
Use transactional parameters placeholders to add data about your products or sales in your emails. It can be information about products purchased, products prices, products left behind in a cart, etc.
Transactional parameter placeholders are predefined if you are using a Brevo plugin or can be defined by you. You may then retrieve the data through an Automation workflow or through an API call to send a transactional email.
➡️ Dedicated article: Customize your emails using transactional parameters
🚰 Filters
Brevo uses filters together with placeholders to provide additional functionality to your emails. You can set up default values in case a contact attribute is empty, or structure the format of words, numbers, and dates.
➡️ Dedicated article: Modify the formatting of your placeholder with filters
👁️ Block visibility
The block visibility option allows you to easily choose how you want to display your blocks in your email templates.
For example, you can:
- Personalize the heading of your email and use a different tone according to the age of your contacts.
- Personalize content blocks to display different products or offers according to specific criteria (for example, a special discount for your loyal clients, according to their preferences etc.).
- Personalize content blocks to suit different reading devices and display certain elements only on smartphones or desktop computers.
➡️ Dedicated articles:
- Show or hide blocks based on contact attributes
- Show or hide blocks based on transactional parameters
- Show or hide blocks based on repeatable blocks
🔁 Repeat block / Dynamic list (for
tag)
Our Dynamic list option, now called Repeat block, enables you to loop or iterate over items in a sequence and display them as a list in your email. For example if you want to display a list of items that your contact has just bought or left in their carts.
This option is very powerful when combined with your transactional parameters and is also helpful when you are designing an email template to hold an unknown number of items in a list.
For an advanced use, you can manually repeat a block by using the for
tag. For example below, a list of the product name followed by the product price for everything the client has purchased. This list will adapt according to the purchase of each client.
➡️ Dedicated article: Repeat a block of items in your emails
🤯 Troubleshoot your emails customized with Brevo Template Language
❌ Incorrect placeholder syntax
After saving the design of your email template or campaign, an error message will appear if the syntax of one of your placeholders is not correct.
In our examples below, a bracket }
is missing at the end of the placeholders. Take a look at the error details to correct the placeholder and save your email template or campaign again.
Even if your API call is structured correctly, the email will not be sent if the email template contains errors.
Error notification for an email campaign
If your API call receives a 200-level response but the campaign is suspended due to an error in the syntax of the email template, a notification about the suspension will appear in your notifications.
Error log for a transactional email
If your API call receives a 200-level response but the email is not received, go to Transactional > Logs to check your Transactional Logs. If your email was not sent due to an error, an Error event will appear in your logs.
⏭️ What's next?
- Enabling the New Template Language
- Using the New Template Language to create email templates and campaigns
- Monitor your transactional email stats
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.