MAPhubspothtml-emailhublmarketing-automation

How to use Draftship with HubSpot Marketing Hub

Design in Draftship, paste the HTML into HubSpot's coded email type, swap merge tags to HubL, and ship a marketing email that renders in Outlook without HubSpot's drag-drop wrapping every block in their layout grid.

HTML import path
code editor
Merge syntax
{{ contact.firstname }} (HubL)
Image hosting
platform CDN
Best for
Teams already paying for HubSpot Marketing Hub Pro or Enterprise.
Watch out for
Coded emails skip HubSpot's drag-drop. You trade visual editing for control.

HubSpot Marketing Hub gives you two ways to build a marketing email: the drag-drop builder, which wraps every block in their layout grid and rewrites your HTML, or the coded email type, which respects what you paste. If you've designed in Draftship, you want the second one. The HubSpot drag-drop will fight your tables, strip your VML buttons, and reformat your inline styles into something neither of you signed off on.

This guide walks the path from Draftship export to a HubSpot coded email that sends correctly to a real list.

Where HubSpot accepts pasted HTML

In HubSpot, go to Marketing → Email → Create email. Pick Custom, then Coded email. You'll land in a code editor with three tabs: HTML, included CSS, and a preview. Paste your full Draftship export into the HTML tab. Don't try to use the drag-drop type; the system rejects bulletproof tables.

STEP 1Design inDraftshipBlock editorSTEP 2ExportOutlook-safe HTMLCmd+ESTEP 3HubSpot CodedEmailMarketing > Email >CustomSTEP 4Swap to HubLtokens{{ contact.firstname}}STEP 5Send to list withsubscription typeRequired by HubSpotHubSpot Marketing Hub handoff
Draftship to HubSpot coded email handoff

The catch: HubSpot requires every marketing email to be tied to a subscription type before it can send. If you don't pick one, the test send works, but the live send is gated. Set this in Settings → Marketing → Email → Subscription Types before you start.

Merge tag mapping (Draftship to HubL)

HubSpot uses HubL, a Liquid-flavored templating language. Draftship's default {{ first_name }} syntax happens to be Liquid too, so most variables port over with a one-token rename:

Draftship variableHubL token
{{ first_name }}{{ contact.firstname }}
{{ last_name }}{{ contact.lastname }}
{{ email }}{{ contact.email }}
{{ company }}{{ contact.company }}
{{ unsubscribe_url }}{{ unsubscribe_link }}
Default fallback{{ contact.firstname or "there" }}

The Recipient switcher in Draftship has a HubSpot preset that runs this swap on export. If you'd rather do it in HubSpot, the email tool will warn you about unresolved tokens before you can schedule.

What HubSpot does to your HTML

HubSpot's coded email pipeline does three things you should know about:

  • It auto-injects the unsubscribe footer if your HTML doesn't already include {{ unsubscribe_link }}. Position is unpredictable. Always add it yourself in your Draftship footer block.
  • It rewrites images linked from external URLs onto HubSpot's File Manager CDN at first send. That's fine, but the URLs change. Don't hardcode CDN URLs from a previous send.
  • It doesn't strip <style> blocks, but it does run the HTML through their sanitizer. Some attribute selectors ([data-foo]) get dropped. Stick to inline styles, which Draftship emits by default.

Subscription type, lifecycle stage, and why your email won't send

HubSpot blocks sends to contacts who haven't been assigned a lifecycle stage or who fall outside the subscription type's audience. The error message is unhelpful. The fix:

1. Confirm the recipient list has lifecycle stage set on every contact. 2. Confirm the subscription type's audience filter actually includes the list. 3. If you imported contacts via CSV, the import doesn't auto-set lifecycle stage. You have to set it in a workflow or via list assignment.

Test send checklist

  • Send to a Gmail and an Outlook account, not just HubSpot's preview.
  • Open the email in Email size checker to confirm you're under Gmail's 102 KB clip threshold.
  • View source in Gmail and check that HubSpot didn't inject extra wrapping divs.
  • Click the unsubscribe link from a recipient address and confirm it lands on HubSpot's preference center.

When to use HubSpot's drag-drop builder instead

If your team includes non-technical marketers who'll edit the email after you ship it, the drag-drop builder is the right tool. The compromise is real: HubSpot's grid will rewrite your structure. If only one person owns the email and you care about Outlook fidelity, stay in coded.

For inline links, see Outlook-safe button patterns and why Gmail clips at 102 KB.

FAQ

Frequently asked questions

Can I use Draftship's drag-drop and still edit the email in HubSpot?
No. Once you paste into HubSpot's coded email type, the drag-drop is disabled for that email. The tradeoff is that your HTML survives sending intact. If you need ongoing edits in HubSpot, design a stripped-down version in their drag-drop and use Draftship for one-shot campaigns.
Does HubSpot strip VML buttons?
No. HubSpot's coded email sanitizer leaves Outlook conditional comments alone, including the VML roundrect tags Draftship emits. Drag-drop emails do strip them, which is one reason the coded path matters.
What's the cheapest HubSpot tier that supports coded emails?
Marketing Hub Starter as of 2026 includes coded email creation. Confirm in your portal under Settings, since HubSpot rotates entitlements per region.
How do I personalize a button URL?
Use HubL inside the href: <code>{{ contact.unique_link or 'https://example.com/fallback' }}</code>. Draftship preserves curly braces in href attributes during export.
Why does my email say 'unresolved token' on send?
HubSpot found a HubL expression it can't resolve, usually because the property doesn't exist on the contact record. The fix is to add a default with the <code>or</code> filter or remove the token.
Try it yourself

Design in Draftship. Paste into HubSpot Marketing Hub.