# Create an email template in the console

Set your postal address, create an HTML, Markdown or Text template with merge tags, attach an unsubscribe group, preview it with sample data, send a test.

A template is the email itself: its subject and body, with merge tags that fill
in each reader's name, your address and their unsubscribe link. Campaigns,
workflows and your app's own mail all send one. This guide writes Acme
Analytics' monthly product update.

> **Note:**
  A console role that can create and update email templates and merge tags, and
  a [sender](/email/connect-a-sender). For marketing mail, an [unsubscribe
  group](/email/unsubscribes-and-opt-in) to attach the template to.

## 1. Set your postal address

[Open Merge tags in the console](https://console.buildbase.app/dashboard/admin/emails/merge-tags)

Every marketing email must carry a postal address, and BuildBase will not send a
campaign without one. In the left rail choose **Messaging**, then **Merge tags**
under **Configuration**. Press **Edit** on **Company Address**
(`{{companyAddress}}`), fill **Value** with a street address, a PO box or a
registered mailbox, and press **Update**.

![The Edit merge tag dialog for companyAddress: the Value Acme Analytics, 548 Market St, San Francisco, CA 94104 highlighted as step 1, and the Update button](/images/email/create-a-template/postal-address.webp)

## 2. Open Templates

[Open Templates in the console](https://console.buildbase.app/dashboard/admin/emails/templates)

Choose **Templates** under **Email**. **All templates** lists yours and the ones
BuildBase keeps for sign-in and account mail. Press **Add new template**.

![The Templates page under Messaging, with the Templates menu item highlighted as step 2 and the Add new template button as step 3](/images/email/create-a-template/templates.webp)

## 3. Name it and pick its type

In **Create template**, fill **Title** and **Template description**, and pick a
**Template type**:

- **HTML**: a drag-and-drop designer, for a laid-out newsletter.
- **Markdown**: headings, lists and links written as text.
- **Text**: plain text, nothing else.

Press **Create**, then **Edit template** on its row. This guide uses Markdown.

![The Create template dialog: Title Product update, its description, and Template type with Markdown picked, highlighted as step 3, and the Create button](/images/email/create-a-template/create-template.webp)

## 4. Write it with merge tags

Fill **Email subject**, then write the body under **Email content**. The merge
tags above it are what you can use, by group: **Recipient** (`{{name}}`,
`{{unsubscribe}}`), **Attributes**, and **Organization** (`{{companyAddress}}`).
Press one to copy it, and paste it where it goes. Press **Update** to save.

![The merge tags with the Company Address tag highlighted as step 4, and the body: a heading, a greeting with the name tag, a line, the address tag and an Unsubscribe line with its tag](/images/email/create-a-template/content.webp)

## 5. Attach the unsubscribe group

The chip in the page header says **Ready** or how many issues the template has.
Press it to open **Template status**, and pick the **Unsubscribe group** this
mail belongs to: a reader who leaves it stops getting this kind of mail and
nothing else. It reads **Ready to go** once every merge tag is valid.

![Template status: Ready to go, all merge tags are valid, highlighted as step 5, and the Unsubscribe group Product updates](/images/email/create-a-template/ready.webp)

## 6. Preview it

Press **Preview**. **With sample data** shows it with each tag filled in, and
**Original** with the tags as written. A tag this template cannot use renders
empty, as it would in a real send.

![Template preview: With sample data highlighted as step 6, the subject What is new at Acme Analytics, and the body with John Doe, the postal address and a sample unsubscribe link](/images/email/create-a-template/preview.webp)

## 7. Send yourself a test

Press **Send test** in the header, pick who it goes to, and send it.

![The page header: Ready, Preview, and the Send test button highlighted as step 7](/images/email/create-a-template/send-test.webp)

## 8. Manage it from the list

Back on **Templates**, each row has its type (change it with the picker), its
unsubscribe group, and buttons to edit, **Duplicate template**, send a test and
delete. Templates BuildBase keeps for sign-in mail have **Reset to platform
defaults** instead of delete.

![The template's row: Product update, Custom, Markdown in the type picker, Product updates, and the Duplicate template button highlighted as step 8](/images/email/create-a-template/row-actions.webp)

## Check it works

The test email arrives with your postal address and a working unsubscribe link.

## Things to watch out for

- **Changing a template's type copies the content as it is.** An HTML design is dropped.
- **A merge tag with no value renders as nothing.** Set every Organization tag you use under **Merge tags**.
- **Your plan caps how many templates you keep.** The ones BuildBase keeps for sign-in mail do not count.
- **An HTML body over 100 KB blocks a campaign.**

## If something goes wrong

| What you see                                                          | What it means                                                                |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| (tag) is not available for this template and will render empty.       | That merge tag does not exist for this kind of mail; pick one from the list. |
| Add your postal address (`{{companyAddress}}`) to the template.       | A marketing email needs `{{companyAddress}}` in it.                          |
| Set your postal address: the `{{companyAddress}}` merge tag is empty. | Fill its **Value** under **Merge tags** (step 1).                            |

## Next Steps

- [Send your first campaign](/email/first-campaign) - send this template to a list.
- [Templates and merge tags](/email/templates-and-merge-tags) - every merge tag and the template API.
- [Unsubscribes and opt-in](/email/unsubscribes-and-opt-in) - the groups a template belongs to.
