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.
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.
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 variable | HubL 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.