> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Email templates for workflows

> Create reusable email templates with variables and defaults, send them from workflows, and see every email sent with each one. Use when automating email.

Email templates are reusable emails, a subject and an HTML body with variables, that your workflows send to contacts. Use them when an automation should send the same email every time, such as a welcome email or a renewal reminder.

> [!NOTE]
>
> **Email templates** in your [OpenCX dashboard](https://platform.open.cx/e/templates). Viewing templates needs the **Channels settings** read permission; creating, editing and deleting them needs write.

## Find the page

* From **[Channels → Email](https://platform.open.cx/channels/configure/mail)**, click **Templates** at the top of the page.
* From the command menu, search for **Email > Templates**.
* From **Sent emails**, click **Templates**. The templates page has a **Sent emails** button that goes back.

These templates are separate from [reply templates](https://docs.open.cx/email/reply-templates.md), the HTML layout that wraps every reply sent from a connected email address. Sequence email steps don't use them either: each step holds its own subject and body.

## Create a template

**1. Start a new template**

Click **New template**.

**2. Name it and write the subject**

**Name** is how you find the template later, for example `Welcome Email`. In **Subject**, insert dynamic values with `{{variable}}` syntax, for example `Welcome aboard, {{name}}!`.

**3. Write the body**

**Body** is HTML, stored and sent exactly as written. Switch between **Editor** and **Preview** to check the result.

**4. Set variable defaults**

Every variable in the subject or body appears as a chip. Click a chip to set a **Default value**, used when no value is provided at send time. A variable without a default needs a value at send time.

**5. Save**

Click **Create template**. To change it later, open the template and click **Save** on the **Editor** tab.

> [!WARNING]
>
> Deleting a template cannot be undone, and workflows that still reference it can break. Check your workflows before you delete one.

## Send a template from a workflow

Add the **Send Email Template** step to a workflow. It sends the template to one contact, who must have an email address.

| Field | What it does |
| - | - |
| **Email Template** | The template to send. |
| **From Domain** | A verified domain from [Settings → Domains](https://docs.open.cx/email/sending-domains.md). |
| **From Prefix** | The part before the `@`, such as `support`. |
| **From Name** | The display name on the email. Optional. |
| **Contact ID** | The contact who receives the email. |
| **Email Template Variables** | Key and value pairs. A value here overrides the variable's default. |
| **Cc**, **Bcc**, **Reply-To**, **Priority**, **Attachments** | Optional. **Reply-To** defaults to the sender; **Priority** defaults to normal. |

The step fails when the from domain isn't registered or verified for your organization.

### Unsubscribes

Workflow template emails are treated as marketing email. They are not sent to a contact who unsubscribed, and each one carries an unsubscribe header. To show a visible unsubscribe link, put `{{unsubscribe_url}}` in the body. OpenCX fills it with a link for that contact, so people in Cc or Bcc who click it unsubscribe the contact, not themselves.

The step is also refused when the contact [restricted the email channel](https://docs.open.cx/contacts/manage-contacts.md#restricted-channels).

## See what a template sent

Open a template and switch to the **Activity** tab. Each email sent with it shows the sender, the contact it went to (linked to their contact page), the sent body, and a status:

| Status | Meaning |
| - | - |
| **Sent** | The email went out. |
| **Pending** | Not sent yet. An email to a contact who unsubscribed stays **Pending**, because it is never sent. |
| **Failed** | The send failed. Hover the status to see why. |

***

## Related Documentation

> [card] [Sending domains](https://docs.open.cx/email/sending-domains.md)
>
> Verify the domain templates send from.

> [card] [Reply templates](https://docs.open.cx/email/reply-templates.md)
>
> The layout around every email reply.

> [card] [Restricted channels](https://docs.open.cx/contacts/manage-contacts.md#restricted-channels)
>
> When sends to a contact are refused.

> [card] [Email templates API](https://docs.open.cx/api-reference/email-templates/list-email-templates.md)
>
> Manage templates and read activity from code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.