Template variables: what data you can put in an email
A mailing template is the design of an email. It contains variables: placeholders such as
{{ contacto.nombre }}that are filled in with each recipient's data when it is sent. This page lists the variables available, how to write a text for when the data is missing, and what the email adds on its own.
What is a variable?
It is a placeholder between double braces. When the email is sent, each recipient gets their own data in that placeholder:
Hello {{ contacto.nombre }}, here is the latest news from {{ empresa.nombre }}.
Ana López receives «Hello Ana López, here is the latest news from Alfarería del Turia». Variables work in the design, in the subject and in the preview text (the line the email client shows under the subject).
Variables follow Liquid, a template language widely used in email tools. Only the ones on this page are accepted: a variable that does not exist is an error, and the warning tells you which line it is on.
In the Design you do not see the braces: each variable appears as a pill with its name («Contact name», «Your company’s Tax ID (NIF)»). With blocks you add it with the Insert variable bar, and conditions are chosen in each element's Settings; when writing with the text editor, with its Variables drop-down. What this page covers is what lies underneath, and it is what you type by hand in the Subject, in the Preview text and in an email pasted as HTML code. See how to design a template and the three ways to write an email.
What happens if a recipient is missing the data?
The placeholder comes out empty. To avoid «Hello ,», add a default text with default:
Hello {{ contacto.nombre | default: "customer" }},
Whoever has a name reads their name; whoever does not reads «Hello customer,».
How do I show a text only to some recipients?
With if. What is inside only appears if the condition is met:
{% if cliente.codigo %}Your customer code is {{ cliente.codigo }}.{% endif %}
{% else %} gives the text for those who do not meet it.
In the design you do not need to write it: choose the element and, in its Settings, set Show only if with the data and whether it has a value or is empty. The program saves it like this.
What variables are there?
About the recipient:
| Variable | What it inserts | Example |
|---|---|---|
contacto.nombre | Name of the CRM contact; if the recipient is an ERP record, the record's name | Ana López |
contacto.nombre_completo | Full name of the contact; for an ERP record, its legal name | Ana López García |
contacto.empresa | Company of the CRM contact | Cerámicas del Norte |
contacto.email | The address the email is sent to | ana.lopez@ejemplo.es |
cliente.codigo | Customer code of the record | 000123 |
cliente.nombre | Trade name of the record | Cerámicas del Norte |
cliente.nombre_fiscal | Legal name of the record (or the trade name if it has none) | Cerámicas del Norte, S.L. |
cliente.poblacion, cliente.provincia | Town / city and province of the record | Burgos |
About your company:
| Variable | What it inserts |
|---|---|
empresa.nombre, empresa.nif | Your company's name and Tax ID (NIF) |
empresa.direccion | Your address on one line: «Calle de la Cerámica 12, 46001 Valencia» |
empresa.telefono, empresa.web | Phone and website |
empresa.logo_url | Address of your company logo, for an image |
About the newsletter and the date:
| Variable | What it inserts |
|---|---|
campania.nombre | Name of the newsletter's campaign |
tematica.nombre | The newsletter's topic |
fecha.hoy | Date of the day the email goes out: «27/09/2026» |
Each recipient's own links:
| Variable | Where it leads |
|---|---|
enlace.baja | To unsubscribe |
enlace.preferencias | To choose which topics to receive email about |
enlace.navegador | To view the email in the browser |
enlace.confirmar | To confirm they want to receive your emails: it records their consent. Valid for 30 days |
They go as the destination of a link: <a href="{{ enlace.baja }}">Unsubscribe me</a>.
enlace.confirmar is the button in the double opt-in email. In your own templates it also records the consent of whoever clicks it, but an unsubscribe is only lifted by the email the person themselves asked for in order to come back.
The campaign, topic, unsubscribe, preferences and confirm variables belong to Marketing templates. A Document template does not accept them: you do not «unsubscribe» from a document.
What variables do document templates have?
The recipient's and your company's, plus those of the document in the email:
| Variable | What it inserts | Example |
|---|---|---|
documento.tipo | Document type | Sales invoice |
documento.numero | Number, as printed | F-2026/000123 |
documento.fecha | Document date | 25/09/2026 |
documento.total | Total, with its currency | 1.234,56 € |
documento.vencimiento | First instalment due date; empty if it has none | 25/10/2026 |
The document can be from any financial year of your company: last year's invoice comes out with its data just like one from this year. If the email carries several, these variables refer to the first one.
When an email carries several documents for the same customer (a send that groups by customer), documento.lista holds them all. You go through them with for, and each one has tipo, numero, fecha, total and vencimiento:
{% for d in documento.lista %}
{{ d.numero }} of {{ d.fecha }}: {{ d.total }}<br />
{% endfor %}
What format do dates and amounts come out in?
Your company's: dates such as «27/09/2026» and amounts with two decimals and their currency, «1.234,56 €». Amounts come out already written: they are for showing, not for doing sums with.
A date can be written differently with date:
{{ fecha.hoy | date: "%d de %B de %Y" }}
gives «27 de septiembre de 2026».
How do I insert an item from the catalogue?
With articulo and the item code:
| You write | You get | |
|---|---|---|
| `{{ "A001" \ | articulo: "nombre" }}` | The item name |
| `{{ "A001" \ | articulo: "precio" }}` | Its sale price including VAT, with your company's decimals: «24,20 €» |
| `{{ "A001" \ | articulo: "imagen_url" }}` | The address of its main image in the online store |
| `{{ "A001" \ | articulo: "enlace" }}` | The address of its public page |
The price is the one on the record for any customer, VAT included: the same one the price checker shows. The image only appears if the item has an image published in the online store or its record points to an image on the internet. Powergest does not publish a page per item, so enlace comes out empty unless you add your own store's link with default:
<a href="{{ "A001" | articulo: "enlace" | default: "https://www.tutienda.es/jarron-azul" }}">View</a>
A code that does not exist leaves the placeholder empty: use default there too.
In the design you do not need to write it by hand: the Catalogue item block asks which item and inserts the photo, the name and the price with these variables. See how to design a template.
What does the email add on its own?
Even if the template does not include it, every marketing email goes out with:
- The legal footer, if the template does not include
enlace.baja: a line with your company's name, Tax ID (NIF) and address, and the link to unsubscribe. The e-commerce law (LSSI) requires it, and it does not depend on someone remembering to add it. If your template already has the unsubscribe link, no second one is added. - One-click unsubscribe in the email header: email clients that recognise it (Gmail, Apple Mail, Outlook) can show a button next to the sender to unsubscribe, which unsubscribes without opening any page.
- Links prepared to count clicks: each link to a website first goes through your Powergest address, which records the click and takes the person to the destination. The recipient lands on the same page. Email links (
mailto:), phone links (tel:), and unsubscribe, preferences and view-in-browser links are left untouched. - An invisible image to count opens, if open tracking is turned on in your company.
- A text version, for email clients that do not show the design.
Document emails carry the text version and the tracking, but not the unsubscribe footer or the unsubscribe button, and they can carry the document attached as a PDF.
What can't you put in a template?
- Images embedded inside the email (those starting with
data:). They make the email huge and many email clients do not show them. Upload the image and use its address. - Variables that do not exist, or that belong to another type of template. It is an error, and the warning gives the line.
And one warning that does not stop you saving: if the email is over 90 KB, Powergest tells you. Gmail cuts emails over 102 KB and hides the end, which is exactly where the unsubscribe link and the tracking are.
Related: Mailing: newsletters, lists and who you can write to · how to design a template · topics and topic unsubscribes · why someone does not receive a newsletter
More about Mailing
- Newsletters and lists from your customers, suppliers and contacts
- Mailing campaigns
- How to design an email template
- Consent and legal basis of each address
- Newsletter control: progress, pausing, resuming and cancelling
- Managing mailing addresses
- The ERP sending service: sending your newsletters without your own email account
- Sending invoices and other documents by email
- Importing mailing addresses from a file
- Mailing: newsletters, lists and who you can write to
- The quality of an email address
- Mailing settings: quality, consent, tracking and retention