HubSpot integration
Connect HubSpot to Better Email to sync a Campaign into HubSpot as a coded email template and a draft marketing email, and to pull contact properties into Better Email as recipient fields for personalization and segmentation.
Before you start
- A HubSpot account on Marketing Hub Professional or Enterprise. Coded email templates, which the sync creates, are not available on Starter or Free, and HubSpot will not let those accounts authorize Better Email.
- A HubSpot user who can create templates and marketing emails.
- An admin user in Better Email who can create and edit integrations.
1. Create the integration in Better Email
- Go to
Integrationsand create a new integration. - Choose
HubSpotas the type and give it a clear name. - Optional: under
Access, restrict the integration to specific users or groups. - Save the integration.
Saving creates the integration's default Destination. Open the Destinations tab to decide how the draft emails HubSpot creates are set up:
Subscription typeandBusiness unit, picked from the account afterFetch from HubSpot. Blank means HubSpot's own default. Business units need HubSpot's Brands add-on; without it the picker says so. Changing either moves later syncs; clearing the business unit moves them back to the main unit, while a subscription type already set on a draft stays, because HubSpot's API cannot unset one.Email folder ID, the folder inMarketing Emailsthe drafts are filed in. HubSpot has no way to list folders through its API, so paste the number at the end of the folder's URL. Blank means the root.From nameandFrom address. The address must be a sending address connected in HubSpot. Left blank, HubSpot applies its own defaults when the marketer opens the email.
If you send under several brands or identities, add one Destination per combination and pick it on the Campaign. The Campaign's own language is set on the HubSpot email regardless of the Destination.
Two of these cannot be undone through HubSpot's API once a draft has them: the subscription type and the language. Clearing either in Better Email leaves the existing draft as it is, so change them in HubSpot if you need the old drafts updated.
2. Connect HubSpot
- Open the saved integration and click
Connect HubSpot. - Sign in to HubSpot if needed and choose the account to connect.
- Approve the access Better Email asks for: content (templates and marketing emails), contact property settings, subscription types, and, when the account has the Brands add-on, business units.
Better Email stores the tokens and refreshes them itself. If HubSpot ever revokes access, click Reconnect HubSpot on the integration.
3. Sync a Campaign to HubSpot
On the Campaign's Review tab, click Sync to <integration name>.
What lands in HubSpot:
- A coded email template in the
betteremailfolder of the Design Manager, one per Campaign, named after the Campaign. It carries the complete rendered email. - A draft marketing email built on that template, with the Campaign's subject, preview text and language, and the subscription type, business unit, folder and sender from its Destination. Open it in HubSpot's
Marketing Emailsto pick recipients, review, and send.
Syncing the same Campaign again updates the same template and the same draft email, so the version the marketer sees in HubSpot is always the latest one. If the email has already been scheduled or sent in HubSpot, the sync stops without changing anything. Clone the email in HubSpot or move it back to draft, then sync again.
Preview text travels too. The exported template declares HubSpot's preview_text module, so the Campaign's preview text lands in HubSpot's Preview text field and the marketer can edit it there. Without that module HubSpot says "This template doesn't allow for the use of preview text" and the field is dead. A Design System that renders its own hidden preheader gets the module anyway, so the field still works; one that already declares a preview_text module of its own is left alone and receives the value there.
4. Optional: sync recipient fields from HubSpot
- On the integration, turn on
Sync recipient fieldsand save. - Click
Sync nowin the page header.
Better Email reads the account's contact properties and creates one recipient field per property. Number and yes/no properties keep their type; dropdown properties become text fields with the property's options as allowed values. Dates and date-times become text, because HubSpot stores them as timestamps that a calendar-date condition never matches. Hidden internal properties, multiple-checkbox properties and structured properties (JSON, coordinates) are left out.
Merge tags render as {{ contact.property }} and segmentation conditions as HubL {% if %} blocks, which HubSpot evaluates per recipient at send time.
Sendability in HubSpot
HubSpot requires every marketing email to carry an unsubscribe link and the sender's physical address, taken from the account's settings. A Design System footer that links its opt-out, meaning {{ unsubscribe_link }} in an anchor's href (or one of the self-rendering {{ unsubscribe_anchor }} and {{ unsubscribe_section }}), and prints the four site_settings address variables, is used as is. When the footer has no unsubscribe variable, Better Email appends a small footer with the account's company name, address and an unsubscribe link below your content, so the email can be sent. To control how that footer looks, put the variables in the Design System's own footer.
Troubleshooting
- "Connect HubSpot" fails before reaching HubSpot. The integration is not saved yet, or the account is below Marketing Hub Professional.
- Sync fails with "scheduled" or "published". The HubSpot email is no longer a draft. See section 3.
- Recipient fields are missing. Turn on
Sync recipient fieldsand runSync now; the connection made before this option was on may need aReconnect HubSpotso it holds the property permission.