# Email templates

A Mechanic account may be configured with one or more **email templates**, used by the [**Email action**](/core/actions/email.md) to render email content using Liquid that can be shared across tasks. Email templates have access to Liquid [**template variables**](/core/actions/email.md#creating-email-template-variables) named after each option in the Email action, including any custom options added by the task author.

Unless configured otherwise, each email will use the email template named "default", if it exists.

## Configuration

Open the Mechanic **Settings** screen, choose **Email templates**, and click **New email template** to start editing your new template.

<figure><img src="/files/kSFBBVKFYSddRJBqjrGD" alt="The Email templates section in Mechanic settings"><figcaption></figcaption></figure>

{% hint style="info" %}
To learn more about formatting messages with HTML, CSS, and images, see [Message formatting](/core/actions/email.md#message-formatting).
{% endhint %}

{% hint style="info" %}
To pass custom variables along to the email template, specify them as additional options to the Email action. To learn more about this technique, see [Creating template variables](/core/actions/email.md#creating-email-template-variables).
{% endhint %}

## Specifying a template

Mechanic will always default to using the template named "default", when present. Feel free to add additional templates – just remember to update your task(s) to use the appropriate template.

Here's an example email action, specifying a non-default template:

```cpp
{% action "email" %}
  {
    "to": "hello@example.com",
    "subject": "Hello world",
    "body": "It's a mighty fine day!",
    "template": "welcome"
  }
{% endaction %}
```

## Migrating from Shopify

Shopify's notification templates may be manually migrated over to Mechanic. To learn more, see [Migrating templates from Shopify to Mechanic](/techniques/migrating-templates-from-shopify-to-mechanic.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.mechanic.dev/platform/email/templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
