Skip to content

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:

VariableWhat it insertsExample
contacto.nombreName of the CRM contact; if the recipient is an ERP record, the record's nameAna López
contacto.nombre_completoFull name of the contact; for an ERP record, its legal nameAna López García
contacto.empresaCompany of the CRM contactCerámicas del Norte
contacto.emailThe address the email is sent toana.lopez@ejemplo.es
cliente.codigoCustomer code of the record000123
cliente.nombreTrade name of the recordCerámicas del Norte
cliente.nombre_fiscalLegal name of the record (or the trade name if it has none)Cerámicas del Norte, S.L.
cliente.poblacion, cliente.provinciaTown / city and province of the recordBurgos

About your company:

VariableWhat it inserts
empresa.nombre, empresa.nifYour company's name and Tax ID (NIF)
empresa.direccionYour address on one line: «Calle de la Cerámica 12, 46001 Valencia»
empresa.telefono, empresa.webPhone and website
empresa.logo_urlAddress of your company logo, for an image

About the newsletter and the date:

VariableWhat it inserts
campania.nombreName of the newsletter's campaign
tematica.nombreThe newsletter's topic
fecha.hoyDate of the day the email goes out: «27/09/2026»

Each recipient's own links:

VariableWhere it leads
enlace.bajaTo unsubscribe
enlace.preferenciasTo choose which topics to receive email about
enlace.navegadorTo view the email in the browser
enlace.confirmarTo 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:

VariableWhat it insertsExample
documento.tipoDocument typeSales invoice
documento.numeroNumber, as printedF-2026/000123
documento.fechaDocument date25/09/2026
documento.totalTotal, with its currency1.234,56 €
documento.vencimientoFirst instalment due date; empty if it has none25/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 writeYou 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:

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?

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