Skip to content
AI for theMarketer
workflows

Email Campaign Automation with ChatGPT and HubSpot

HubSpot picks who gets the email and when, ChatGPT drafts a version per segment, and a person approves. The six-step setup, prompt included.

Rob Vail8 min read

Email campaign automation with ChatGPT works when each tool does the job it is built for. HubSpot holds the contact data, decides who is in which segment and sends the emails on schedule. ChatGPT writes a version of the email for each segment from a brief you give it. A person reads every version before it goes into HubSpot. I set it up in that order, segmentation first, then personalization, then sending, and this post is the setup step by step.

The failure I see most often is the reverse: someone asks ChatGPT to “write a nurture sequence for our leads” before deciding who the leads are, and gets five well-written emails aimed at nobody. Starting from the segments fixes that. This is one of the workflows in my prompt library, and it sits on top of the prompts in personalization prompts for email, which go deeper on the writing side.

What you need before you start

I check four things before building any of this.

HubSpot with workflows. According to HubSpot’s workflow documentation, workflows are available on the Professional and Enterprise tiers of its hubs, and creating them needs edit permission for workflows. On a Starter plan you can still use the segment and drafting steps below and send each email by hand.

Clean properties for segmenting. Lifecycle stage, industry, product interest, or whatever you segment on has to be filled in for most contacts. If half your contacts have a blank industry, a segment built on industry is half a segment. My data cleaning guide covers the audit I run first.

A brief. The goal of the campaign, the offer, the deadline if there is one, and the facts the emails may use. The model writes from this and nothing else.

One owner for approval. Someone who reads every version before it is built in HubSpot. In a small team that is usually the email marketer.

Steps 1 and 2: segments in HubSpot, brief in writing

Step 1: build the segments in HubSpot. Create an active list for each segment, so contacts join and leave automatically as their properties change. I keep it to two to four segments per campaign. Each extra segment is another version to write, approve and measure, and below a few hundred contacts a segment rarely tells you anything about what worked.

For each segment I write one line saying what is different about these people and what that changes in the message. “Trial users who never invited a teammate: they have not seen the collaboration features, so the email shows one.” If I cannot write that line, the segment does not need its own email.

Step 2: write the brief. I use a plain document with the campaign goal, the offer, the call to action, the facts allowed in the emails (product details, prices, dates), and the segment lines from step 1. Everything ChatGPT writes in step 3 comes from this page.

Step 3: the drafting prompt

This is the prompt I run in ChatGPT. One run produces every segment’s version, so they are written against the same brief.

You are writing marketing emails for [BRAND]. Follow the voice
rules below.

VOICE RULES
[paste your voice rules]

BRIEF
[paste the brief from step 2]

SEGMENTS
[paste one line per segment: name, who they are, what changes
in the message]

TASK
Write one email per segment. Each email has:
- two subject lines under 50 characters, one direct, one curious
- preview text under 90 characters
- a body of 120 to 200 words with one call to action

Rules:
1. Use only facts from the brief. If an email needs a fact the
   brief does not contain, write [NEEDED: what is missing].
2. Personalization tokens: write them as {{firstname}} or
   {{company}} and never build a sentence that breaks if the
   token is empty.
3. Change the message between segments, not only the greeting.
   If two segments end up with the same email, say so and stop.

After the emails, list every claim you made and which line of the
brief it came from.

The last instruction is the one I rely on most. A list of claims next to their source lines makes the approval step fast, because the approver checks the list against the brief instead of rereading every email looking for invented details. Rule 3 is the segmentation check: if the model cannot make two versions meaningfully different, the segments are probably not different either.

If you write this kind of email every week, put the voice rules and the hard rules in a custom GPT for email so you are not pasting them each time.

Steps 4 and 5: build and send in HubSpot

Step 4: build the emails in HubSpot. Create one marketing email per segment and paste in the approved copy. Replace each {{token}} with HubSpot’s personalization token for that property, and set a default value for every token. A default like “there” for a missing first name is the difference between “Hi there” and “Hi ,”. HubSpot’s own AI can also refine text inside the email editor. HubSpot’s Breeze documentation lists marketing email among the places you can refine highlighted text, and an admin has to switch on the generative AI settings first. I use it for small rewrites after approval, never for new claims.

Step 5: build the workflow. Create a contact-based workflow for each segment, or one workflow with branches. The enrollment trigger is membership of the segment’s active list. Add the send email action, any delays between emails, and an unenrollment or goal condition, usually “became a customer” or “booked a demo”, so people stop getting the sequence once they have done the thing it asks for. The same documentation describes this pattern of enrolling contacts and sending them a marketing email as a core use of workflows.

Before turning the workflow on, I send test emails to myself and preview each email as two or three real contacts from the segment, including one with blank properties. That catches broken tokens and the odd sentence that only reads badly for one company name.

Step 6: read the results by segment

Each email’s performance in HubSpot is the scorecard for each segment’s version. I compare click rate and the goal conversion per segment, not the campaign total, because the total hides a segment that is not working.

Small segments make this hard. A difference of a few clicks between two segments of 400 contacts is noise, and I would not change anything on it. My guide to statistical significance shows the arithmetic in plain numbers. What I do with weak segments is go back to the one-line description from step 1. Usually the line was vague, and the email was too.

Where the setup breaks

These are the three failure patterns I watch for.

Segments on bad data. A segment built on a property that is wrong for a third of contacts sends the right email to the wrong people. The fix is upstream, in the CRM, not in the copy.

Approval becomes a skim. After a few campaigns, approval turns into a glance at the subject lines. The claims list from the prompt keeps the approver honest, because there is a specific list to tick off.

Personal data in the prompt. The drafting prompt needs the segment description, not contact records. I never paste names, emails or CRM exports into ChatGPT for this workflow. If you market in Europe, my GDPR guide covers what to clear with whoever handles data protection before any customer data goes to an AI tool.

FAQ

Can ChatGPT send emails through HubSpot directly? Not in this setup. ChatGPT writes, HubSpot sends. Connecting them through an automation tool is possible, but I prefer a person between the draft and the send, because an email goes to the whole segment at once and cannot be recalled.

Why not use HubSpot’s AI for everything? You can, for single emails. I draft in ChatGPT because one prompt writes every segment’s version against the same brief and returns the claims list, which makes approval faster. HubSpot’s AI is useful for edits once the copy is in the editor.

How many segments should one campaign have? I start with two to four. More segments only pay off when each one is large enough to read results from and different enough to need its own message.

Do I need to A/B test the subject lines? The prompt gives two per email, and HubSpot can test them on larger sends. For how I write and choose them, see my subject line prompts.

This workflow is part of the prompt library. The role that usually owns it is covered in AI for email marketing managers, and the wider practice starts at the complete guide to AI marketing.