# Create and edit email templates

> The template editor in Customers > Campaigns: blocks, variables, catalog products, unsubscribe footer, languages, starter templates, versions and preview by provider.

## The template editor

## The template editor

A **template** is the design of the email you will send in your campaigns: the header, the text, the buttons and the legal footer. You create it once and reuse it in as many sends as you want. This guide explains how to use the editor; for the full flow see [Email campaigns: what they are and what you need to get started](lueira-guide:6ceac2a3-734d-4cfa-936f-59f6f6a578d3?locale=en).

Templates are in **Customers > Campaigns > Templates**. The **New template** button opens the full-screen editor.

⚠️ Do not confuse it with the templates for automatic **order emails** (in **Communications**) or with WhatsApp ones: they are something else. See [Email settings in Lueira](lueira-guide:93c796ba-04da-4854-b2ca-3759bbb3c938?locale=en).

![Full-screen template editor with the top bar, the left panel with the Blocks, Layers and Variables tabs, the canvas with the Unsubscribe me footer and the style panel](https://media.support.lueira.com/images/5b2ed277-5185-4c24-91a0-1217452a578c.jpg)

At the top you have:

- **Internal name**: how you see it in the list (customers do not see it).
- The **language** selector (Catalan, English, Spanish).
- The **Editor / Preview** switch.
- The **Create template** button (it becomes active when there is a name and a subject) and the **X** to exit. If you exit with changes it asks whether you want to discard them.

Below, a bar with the email **subject** (it says "You can use {{nombre}}"). Above the canvas you have the **undo and redo** buttons, **Templates** (starter templates), **Products** (insert cards from your catalog), **Lueira Intelligence** (AI help), the switch between **desktop and mobile** view and **Code**. On the left, the panel with the **Blocks**, **Layers** and **Variables** tabs; on the right, the **Style** and **Settings** panel of the selected element.

### Save and find your template

When you click **Create template** the notice **Template saved** appears. The button changes to **Save new version** and the **Version 1** indicator appears next to the bar. When you exit, the template appears in the **Templates** tab, with its **Name** and the date it was created (**Created**). Click a row to open it and keep editing.

![Templates tab with a saved template and its creation date](https://media.support.lueira.com/images/95b9c1bb-b530-473e-97dc-bc7ecad5cdcb.jpg)

## Start from a template and blocks

## Start from a starter template

You do not have to start from scratch. Click **Templates** in the editor bar and choose one of the four starter templates:

- **Promotion**: featured image, offer and button.
- **Newsletter**: news in two columns.
- **Announcement**: colored band, message and button.
- **Simple message**: just text and signature.

![Start from a template window with Promotion, Newsletter, Announcement and Simple message](https://media.support.lueira.com/images/9958ea78-e23e-45e7-a755-0766fc191074.jpg)

Then change the texts, the image and the button to your liking.

## The blocks

The left panel (**Blocks**) has the pieces you drag into the email. The **Layers** tab lets you see and reorder the structure. The available blocks are:

- **Marketing**: Header with image, Product card, Social networks and Signature.
- **Content**: Text, Button and Image.
- **Structure**: 2 columns, 3 columns, Image + text, Divider and Spacer.

Click an element on the canvas to see its options in the right panel: **Style** (dimensions, typography, decorations) and **Settings**. With the desktop and mobile icons in the canvas bar you see how it looks on each screen, and the **Code** button shows the email's code for anyone who needs it. With the arrows you undo and redo changes.

💡 Most readers open the email on their phone: always check the mobile view, use images with good contrast and a single main button.

## Insert products from your catalog

## Insert products from your catalog

If you want to show your activities or items in the email, you do not need to build the cards by hand: click **Products** in the canvas bar and the **Add products** panel opens. The products you choose are added as **cards linking to your online shop**.

![Add products panel with the Group lessons, Private lessons, Packs, Rental, Rental packs and Shop tabs, the search box, the selected counter and the cards-per-row options](https://media.support.lueira.com/images/12df48a6-cc04-43d0-ad83-0787a3f62ef2.jpg)

1. Choose the product type in the tabs: **Group lessons**, **Private lessons**, **Packs**, **Rental**, **Rental packs** or **Shop**.
2. Use **Search by name** if you have many products and tick the ones you want. The counter shows how many you have ("0 of 12 selected"): **the maximum is 12 per insertion**.
3. In **Cards per row** choose **1**, **2** or **3**.
4. Optional: tick **Add "View full catalog" button**.
5. The **Tag links as visits from the email (UTM)** checkbox is on by default: it lets you see in your analytics that the visit came from the email.
6. Click **Insert into email** (or **Cancel** to close without changes).

💡 Some products show the **No image** label: their card will appear without a photo. Add an image to the product first if you want the email to look better. Always check the result in the **Preview** and in the test send.

## Variables, unsubscribe footer and languages

## Variables: personalize each email

Variables are replaced with each customer's data when sending. In the left panel, the **Variables** tab groups them and explains each one. Click one to insert it where your cursor is; if no text is selected, a new block is added.

- **Customer**: `{{nombre}}` (first name), `{{apellidos}}` (last name) and `{{email}}` (the customer's email).
- **Company**: `{{empresa}}`, the name of your business.
- **Required in the footer**: `{{direccion_empresa}}` (your business's postal address) and `{{enlace_baja}}` (the unsubscribe link). Both are already in the footer and you do not need to insert them.

Example: "Hi `{{nombre}}`, take advantage of this promotion at `{{empresa}}`".

💡 The **test send** and the **Preview** fill the variables with sample data (for example, "Hi Marta"), so they do not confirm that your customers' names arrive correctly (see [Send an email campaign step by step](lueira-guide:4e7ee4bb-4a0d-4150-99b1-9b15f319d7b1?locale=en)). Before sending to a whole group, make a first real send to a small group (for example, yourself) and check the greeting. If the name arrives empty ("Hi ,"), contact support giving the name of the send; in the meantime, write the greeting without depending on the name.

## The unsubscribe footer and the address

Every commercial email must include the **unsubscribe link** and your **company's address**. The editor already has them in the footer: the **Unsubscribe me** link and `{{direccion_empresa}}`. The `{{enlace_baja}}` variable is replaced by the **provider** with its own unsubscribe link, so the unsubscribe is always respected. The editor itself reminds you of this at the bottom of the screen.

⚠️ Do not remove or change the unsubscribe link or the address: without them Lueira will not let you send (pre-send check "Valid template (variables, unsubscribe and address)"). The address comes from **Settings > Company details**.

## Languages

The selector at the top (**Catalan**, **English**, **Spanish**) lets you write the template in each language. You can limit a group to one language with the **Customer language** condition (see [Create customer groups by rules](lueira-guide:a160ed54-a730-4414-9e63-d7f9d83c4e7e?locale=en)).

## Preview and what to do if…

## Preview by provider

Click **Preview** (at the top) to see the email as it will be sent. You can choose how to view it:

- **Sample data**: with a fictitious customer and the real data of your business (the subject is shown with a sample name).
- **Brevo**, **Mailchimp** and **GoHighLevel**: how the email looks once adapted to each provider. With a provider chosen, the **View the code the provider receives** checkbox appears if you want to see the exact code.

![Template preview for Brevo with an unknown variable notice and the footer with the Unsubscribe me link](https://media.support.lueira.com/images/32ba6cff-6c70-4d0c-99d3-d2cdc4894107.jpg)

## Versions

Every time you click **Save new version**, Lueira saves a new version of the template. Click the **Version N** button in the top bar to see the history: each version shows its subject and the date and time it was saved.

- With **Load into editor** you recover a previous version. The version you are editing appears as **Loaded in the editor**.
- If you load an old version and save it, **a new version is created**: the old one is not overwritten.

![Versions panel with Version 1 and Version 2 and the notice about sends already created](https://media.support.lueira.com/images/9232ea70-6801-41da-bbe0-d5b58e34cb77.jpg)

💡 The panel itself reminds you: **sends already created keep the version they were prepared with**. Editing the template does not change the sends you had already prepared.

⚠️ **Deleting a template**: today there is no button to delete a template, neither in the list nor inside the editor. If you need to remove one, ask support.

## What to do if…

- **"Create template" is greyed out.** The **internal name** or the **subject** is missing: write both.
- **A screen "An error has occurred. Please try again" appears when opening the editor.** Sometimes the editor does not load the second time you open it without reloading the page. Click **Try again**; if it persists, reload the page (and enter again from **Customers > Campaigns**). Your saved templates are not lost.
- **The Brevo preview shows an "unknown variable" notice about the unsubscribe variable.** It is a technical notice in Brevo's preview (it does not appear in Mailchimp): do not change the unsubscribe link in the footer. If it prevents you from sending, contact support.
- **I lost my changes when exiting.** The editor asks before discarding; if you clicked "Discard changes", they cannot be recovered.
- **It says the unsubscribe link or the address is missing.** Restore the footer with **Unsubscribe me** and `{{direccion_empresa}}` and check the address in **Settings > Company details**. See [Common errors and questions about email campaigns](lueira-guide:c513c4ba-9a7c-4898-8b53-f07acfbf951c?locale=en).

Source: https://help.lueira.com/en/articles/crear-y-editar-plantillas-de-email
