# Exporting a Dyspatch Email to HubSpot


Use our integration with <a href="https://www.hubspot.com/products/marketing/email" target="_blank">HubSpot</a> to deliver engaging email experiences to your customers.

## Build and Approve in Dyspatch

In Dyspatch, use the drag and drop email editor to create a beautiful, responsive, and engaging email. Collaborate with your team to approve and publish. 

Once your email is [approved by your team](/emails/submitting_an_email/#draft-approved) and published, you can move it into your HubSpot account by exporting it with our [HubSpot Integration](/integrations/hubspot_setup/), or you can download your email to upload it to HubSpot manually.

## Export an Email with the HubSpot Integration

From a published email, Click **Export**, double check the Email Name, then click **Confirm & Export**. 

![HubSpot Confirm Export Deatils](https://docs.dyspatch.io/img/exports/export-to-hubspot.png)

<div class="highlight tip">If your workspace has more than one integration, make sure you are on the "Export to Integration" tab in the <b>Export</b> modal.</div>

#### Troubleshooting Hubspot Required Tags

HubSpot requires the following tags in your Dyspatch email in order to export successfully:

- `@{site_settings.company_street_address_1}`
- `@{site_settings.company_state}`
- `@{site_settings.company_name}`
- `@{site_settings.company_city}`

It also requires either both unsubscribe link tags:

- `@{unsubscribe_link}` and `@{unsubscribe_link_all}`

or the unsubscribe section tag:
- `@{unsubscribe_section}`

If these tags are not included, Hubspot will reject the email and you'll see the reason for the failed export in the export modal.

### Locating your Dyspatch Email in Hubspot

Upon successful export the email can be accessed via **Marketing > Email**. There will also be a folder created named **Dyspatch Import** where the HTML can be accessed by navigating to **Content > Design Manager** in the left hand navigation menu in HubSpot. 

![Left menu items in HubSpot with Marketing then Email highlighted](https://docs.dyspatch.io/img/exports/hubspot-marketing-email-menu.png)

## Export an Email Manually to upload to HubSpot
Your email must be [approved by your team](/emails/submitting_an_email/#draft-approved) and published before you can export it. 

### Export Email from Dyspatch

Select **Export > Download as...** in the email builder.

![Download as option under Export dropdown menu from the email builder](https://docs.dyspatch.io/img/exports/export-download-as.png)

From the **Download HTML** tab, Select the download logo under **HubSpot** to save the file locally, or copy the HTML code of the email.

![Download HTML modal with HubSpot download highlighted](https://docs.dyspatch.io/img/exports/download-email-hubspot.png)

If downloaded, a zipped file will be downloaded onto your system with the HTML, plain text content, metadata, and localizations (if applicable).

If copied, the HTML code for your Dyspatch email will be stored in your computer's clipboard. 

### Add the Email to HubSpot

#### Create a Blank Hubspot Template

On your HubSpot dashboard, navigate to **Content > Design Manager** and select **Create a new file**, or through the **Marketing > Email** path select **Create email**

Select **HTML + Hubl** as the file type and click **Next**.

![New file menu to create new template in HubSpot](https://docs.dyspatch.io/img/exports/hubspot-new-file-html.png)

Change the **Template Type** to **Email**, give it a File Name, and optionally change it's location. 

![Modal with options filled in to create new html template in HubSpot](https://docs.dyspatch.io/img/exports/hubspot-new-html-template.png)

#### Retrieve HTML 

If you copied the email from Dyspatch then the HTML code should still be in your computer's clipboard and ready to paste. If not, copy the code again from Dyspatch. 

If you downloaded the email from Dyspatch, unzip the folder and open the .html file in your browser. Right click the page and select **vew page source**. Highlight all of the code and copy it to your clipboard. 

#### Paste HTML into HubSpot

In your new HubSpot template, highlight all of the boilerplate HTML, delete it, and paste in the email HTML code from Dyspatch. 

![Screenshot of pasing HTML code into the HubSpot email builder](https://docs.dyspatch.io/img/exports/hubspot-paste-html.png)

Select **Publish changes** to save your email and viola! Your Dyspatch email is now in HubSpot!

To view the email itself, navigate to **Marketing > Email**. 

### Learn More
Read more about working with HubSpot in Dyspatch on our [HubSpot Integration](/integrations/hubspot/) page.
