# How to upload your email templates?

If you want to use your own email templates, you can directly import them on your Batch dashboard.

## Prerequisities <a href="#h_f0c6335fce" id="h_f0c6335fce"></a>

Before you upload your file, you need to create your own HTML email template. Whether you create your templates yourself or use an e-mail builder, your file must be a single **compressed ZIP file** containing:

* A single HTML file saved as "**index.htm(l)**" or "**mail.html**" (with a maximum size of 512kb)
* A single image folder containing all the images of your e-mail template saved as "**images**"

💡 Depending on your operating system, compress the file selecting both elements ("**index.html file**" (or mail.html) + "**images" folder**")

For example, here is how it goes on macOS:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FCS1VHyYsExxVhpZG3EOg%2FEnregistrement-de-l%E2%80%99e%CC%81cran-2023-02-21-a%CC%80-16.59.57%20(1).gif?alt=media&#x26;token=1cee2636-bc4f-4e75-8883-d6f7cdc67cba" alt="Compress email HTML template on Mac OS"><figcaption></figcaption></figure>

{% hint style="danger" %}
If you want the images to be hosted by Batch, you need to put them in the image folder and replace the URLs in the HTML (with a code editor for example) before uploading the ZIP file on the Dashboard.
{% endhint %}

## Uploading your template <a href="#h_82849f2e3c" id="h_82849f2e3c"></a>

{% stepper %}
{% step %}

### Create a new campaign

On your Batch Dashboard, go to **Campaigns > New campaign > Email message**, name it to start a new campaign, choose the targeting and timing, and go to the **Message** section:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FdG4JqiUNyfBdVT4ckguJ%2FEnregistrement%20de%20l%E2%80%99e%CC%81cran%202025-09-08%20a%CC%80%2016.47.04.gif?alt=media&#x26;token=b0bcc9e0-a704-42f7-b24f-98c80d47eb3d" alt=""><figcaption></figcaption></figure>

You can choose between '**Design your message with the Email Composer**', '**Upload your ready-to-use HTML template**', or '**Open the code editor \</>**'.\
We'll focus on the last two!
{% endstep %}

{% step %}

### Upload your ready-to-use HTML template <a href="#h_df37239cf8" id="h_df37239cf8"></a>

If you choose to directly add your file, click on '**Upload your ready-to-use HTML template**' and select your file.

It will be added and the preview of your template will appear:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FLEqixgj649u7FYcWdFDV%2FEnregistrement%20de%20l%E2%80%99e%CC%81cran%202024-10-08%20a%CC%80%2010.57.00.gif?alt=media&#x26;token=7132b728-a4a4-4f87-8d8e-0baa98261e6b" alt="Upload and preview HTML template"><figcaption></figcaption></figure>

{% hint style="warning" %}
&#x20;If this one does not suit you, you can click on **Delete** and upload a new one or if you want to make some changes, you can edit it by clicking directly on **Edit Email**.
{% endhint %}
{% endstep %}

{% step %}

### Open the code editor \</> <a href="#h_77ebb88669" id="h_77ebb88669"></a>

If you choose to add your template via the HTML code retrieved from your e-mail builder, click on '**Open the code editor \</>**' and add the code:

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FWVu9oFbEdDCi5uEwdKM7%2FEnregistrement%20de%20l%E2%80%99e%CC%81cran%202024-10-08%20a%CC%80%2011.20.36.gif?alt=media&#x26;token=e4b033f4-d248-4e3d-92cc-8fdd5f1d034f" alt="Edit email HTML content via code editor"><figcaption></figcaption></figure>

Once all the content of your email is adjusted, click on **Continue:**

<figure><img src="https://509463063-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfiAYaWDWqtFZeXxyg67F%2Fuploads%2FpW2ohsVuiy19Risztzqt%2FCleanShot%202024-10-08%20at%2011.24.09%402x.png?alt=media&#x26;token=a10dae84-251e-460d-a0b0-76352b36bdfa" alt="Continue button to save an email template"><figcaption></figcaption></figure>

Your email is now ready to be sent! ✨

{% hint style="warning" %}
Before launching your email, don't forget to test it by using the **Send test** feature.
{% endhint %}
{% endstep %}
{% endstepper %}

Don't hesitate to use the **Dashboard's preview mode** and send yourself test emails to check that your emails are displayed correctly regardless of the device.
