Update email templates to use default email modules

When building email templates, HubSpot provides a set of default email modules to get you started. These modules are similar to default web modules, but are split up to enable HubSpot to release updates to these modules for better email client support, while also releasing updates to the web versions of the modules separately. Existing email templates using the web modules will still function, but you'll need to update your email templates to use these new modules for forwards compatibility and to avoid errors in the design manager and CLI.

The following are the new email-specific modules that should replace existing usage of the web default modules:

Below, read more about the new email modules and how to update your email templates to use them.

Updating to the new modules

To update an email template to use the new default email modules, you'll need to update either the module path or ID. All email module paths are prepended by email_, and all email modules have been assigned a new ID. You can review the section below for a full list of new module paths and IDs.

Below is an example of updating an email template to use the new email logo module, either by referencing its new path or ID.

Updating the module by path

Original

{% module "logo_with_path" path="@hubspot/logo" %}

Updated

{% module "logo_with_path" path="@hubspot/email_logo" %}

Updating the module by ID

Original

{% module "logo_with_id" module_id="1155232" label="Logo" %}

Updated

{% module "logo_with_id" module_id="122980089981" label="Logo" %}

New default email modules

The following modules have been added for email templates. When reference these modules in your email templates, you can use either the module path or ID.

Email blog post filter

{% module "email_post_filter" path="@hubspot/email_post_filter" %}
Path
ID
  • Old: @hubspot/post_filter
  • New: @hubspot/email_post_filter
  • Old: 1366743
  • New: 122980089983

Email blog post listing

{% module "email_post_listing" path="@hubspot/email_post_listing" %}
Path
ID
  • Old: @hubspot/post_listing
  • New: @hubspot/email_post_listing
  • Old: 1367088
  • New: 122980089986

Email call-to-action

{% module "email_cta" path="@hubspot/email_cta" %}
Path
ID
  • Old: @hubspot/cta
  • New: @hubspot/email_cta
  • Old: 1790629
  • New: 122980089970

Email header

{% module "email_header" path="@hubspot/email_header" %}
Path
ID
  • Old: @hubspot/header
  • New: @hubspot/email_header
  • Old: 1155826
  • New: 122980089978

Email linked image

{% module "email_linked_image" path="@hubspot/email_linked_image" %}
Path
ID
  • Old: @hubspot/linked_image
  • New: @hubspot/email_linked_image
  • Old: 1155231
  • New: 122960526478
{% module "email_logo" path="@hubspot/email_logo" %}
Path
ID
  • Old: @hubspot/logo
  • New: @hubspot/email_logo
  • Old: 1155232
  • New: 122980089981

Email one line of text

{% module "email_text" path="@hubspot/email_text" %}
Path
ID
  • Old: @hubspot/text
  • New: @hubspot/email_text
  • Old: 1843376
  • New: 122980089988

Email section header

{% module "email_section_header" path="@hubspot/email_section_header" %}
Path
ID
  • Old: @hubspot/section_header
  • New: @hubspot/email_section_header
  • Old: 1155240
  • New: 122980089987

Email social sharing

{% module "email_social_sharing" path="@hubspot/email_social_sharing" %}
Path
ID
  • Old: @hubspot/social_sharing
  • New: @hubspot/email_social_sharing
  • Old: 1155241
  • New: 122980537516

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.