How do I add my custom email template to HubSpot?

Last updated: April 18, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A

Follow these steps to add your custom HTML template to HubSpot.

  • Navigate in your HubSpot Marketing account to Content > Design Manager
  • In the left navigation, click on the Coded Files folder and then click New coded file at the top
  • Select Code Editor and Email
Template Builder
Select a Folder to save this template in
  • Add a File name and click Save.
  • Add the code for your custom html template.
  • Be sure to include the required email and CAN-SPAM tokens (check the HubL Documentation link in the top-right for the required tokens to validate a HubSpot email template)
    • All Email Templates must include an Editable Main Content Body Module as referenced in the above HubL Documentation link
    • The required CAN-SPAM tokens can be included in two ways:

1. Include one token that pulls in the unsubscribe CAN-SPAM section: "{{unsubscribe_section}}". When this token is used, you won't have the ability to format the language and style of the text and links. Here is an example of what the "{{unsubscribe_section}}" would appear as:

You will then need to add the following tokens individually:

{{site_settings.company_city }}


2. Include the required individual unsubscribe link and address tokens:

{{unsubscribe_link}} or {{unsubscribe_link_all}} (include at least one)
{{site_settings.company_city }}

Using the tokens individually will allow you the flexibility to add wording around the tokens and links and to format them in the desired style and language. A full list of tokens can be found in the HubL Documentation link above.

  • Click Actions > Save
  • Click Publish Changes
  • You can now select your custom template for use in emails when creating a new email in Content > Email

Was this article helpful?