Personalized Customer Onboarding Email Sequence With n8n
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
Importing this blueprint? Follow the n8n guide — credentials, test runs, and common pitfalls.
Open import docs →Download Integration Assets
Import this editorially reviewed blueprint directly into your n8n dashboard.
Connected Apps
Interactive Workflow Canvas
Drag nodes vertically to re-order execution sequence. Edit or add steps to customize your blueprint.
Execution Steps
-
New Customer Trigger from HubSpot
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
HubSpot -
Fetch First-Week Usage Data from Mixpanel
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
Mixpanel -
GPT-4o Generates All 5 Emails
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
GPT-4o -
Parse Email Content
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
n8n -
Schedule Gmail Sends at Optimal Intervals
Generate personalized 5-email onboarding sequences for new customers using HubSpot, Mixpanel usage data, and GPT-4o.
Gmail
Prompt Customizer Sandbox
Variables
You are an expert customer success copywriter. Write a single onboarding email for a new customer.
Customer context:
- Name: [CUSTOMER_NAME]
- Plan: [PLAN_TYPE]
- Company size: [COMPANY_SIZE]
- Industry: [INDUSTRY]
- Signed up: [SIGNUP_DATE]
- First actions taken in product: [FIRST_ACTIONS]
- Features NOT yet explored: [UNUSED_FEATURES]
Email to write: [EMAIL_NUMBER] of 5 in the sequence
Email goal: [EMAIL_GOAL]
Send timing: [SEND_TIMING] after signup
Guidelines:
- Subject line must be under 50 characters and avoid spam trigger words
- Opening line must reference a specific action they took (not generic "welcome")
- Body: 120-180 words maximum
- Include exactly one CTA with a clear action verb
- Tone: warm, competent, non-pushy
- Sign off from: [SENDER_NAME], [SENDER_TITLE]
Return format:
SUBJECT: [subject line]
PREVIEW: [preview text, 60 chars max]
BODY: [full email body]
Generic onboarding sequences — “Welcome! Here’s how to get started” — convert at 2–5%. Personalized sequences that reference what a customer actually did in their first session convert at 15–25%. The gap exists because personalization at scale has always required engineering time or expensive email platforms. This workflow eliminates that bottleneck by pulling real behavioral data from Mixpanel and feeding it directly to GPT-4o, which writes each email as if a CSM had personally reviewed the customer’s account.
The five-email sequence maps to the standard onboarding arc: (1) immediate welcome that reinforces the first action taken, (2) guide to the next logical step, (3) mid-week check-in that highlights an unused high-value feature, (4) social proof email with a relevant case study based on company size/industry, (5) two-week review with an invite to a check-in call. GPT-4o receives different goals for each email, so the sequence builds rather than repeating the same message.
At $0.03 per sequence, this is dramatically cheaper than most email platforms’ personalization add-ons, and the copy quality consistently outperforms template-based approaches because GPT-4o can construct genuinely specific sentences like “Since you’ve already connected your GitHub repo, you’re one step away from enabling automated deployments.”
Prerequisites
- n8n instance (Cloud or self-hosted) with at least 100 workflow executions/month available
- HubSpot account with API access — any paid tier, or the free CRM with API enabled
- Mixpanel project with event tracking implemented; you need
user_idto match to HubSpot contacts (use email as the common identifier) - OpenAI API key with GPT-4o access (each 5-email sequence costs ~$0.03 total)
- Gmail account connected via OAuth 2.0 in n8n (or a transactional email provider like SendGrid as an alternative)
- Your 5-email sequence goals and timing defined before building — don’t skip this planning step
Setup Guide
- Define your sequence structure before touching n8n. Write down: email number, goal, timing, and the specific CTA for each of the 5 emails. This becomes your loop configuration.
- Set up the Mixpanel query — use Mixpanel’s Engage API (
/api/2.0/engage) to pull event data by$email. Test the API call in Postman first to confirm you’re getting the right event names. - Map HubSpot fields — ensure plan type is stored as a HubSpot contact property. If it’s only in a deal, add a workflow in HubSpot that copies deal stage to contact property on deal creation.
- Import the n8n blueprint and connect credentials: HubSpot (OAuth), Mixpanel (API Secret), OpenAI (API key), Gmail (OAuth).
- Configure the loop node with your 5 email specifications. Use
$indexto pass the correct goal and timing per iteration. - Test with a real account — create a test HubSpot contact and verify Mixpanel returns real event data. Check all 5 generated emails before activating live.
- Set the Gmail delay using n8n’s Wait node between each Gmail send. Configure waits in hours: 1, 48, 168, 336, 504 (i.e., 1hr, 2days, 7days, 14days, 21days).
- Add error handling — wrap the Mixpanel call in a try/catch. If Mixpanel returns no data (new customer hasn’t taken any actions yet), pass a default “no actions taken” string to GPT-4o so emails still send with a reasonable fallback.
Who This Is NOT For
- B2C businesses with high email volume (thousands of signups/day) — GPT-4o API costs and n8n execution limits will become factors. At 500+ signups/day, consider batching or switching to a prompt-based personalization layer within a dedicated ESP.
- Teams without Mixpanel or an equivalent product analytics tool — the personalization depends entirely on behavioral data. Without it, you’re writing generic emails at high cost for no benefit over templates.
- Companies in the EU without a reviewed data processing agreement with OpenAI — customer PII (name, company, usage behavior) passes through the OpenAI API. Ensure your DPA covers this use case.
- Sequences requiring A/B testing — this workflow generates and sends; it doesn’t split-test variants. Plug into an ESP with testing capabilities if optimization is critical.
Did this blueprint work for you?
AI integrations change fast. Help keep recipes accurate.
Related Blueprints
More n8n Blueprints
Recommended for Sales Reps
- Code Pipedrive Create Triggered Integrate Google Drive and If and OpenAI and Set and Code and Gmail and Sticky Note automatically using n8n.
- Lemlist Slack Create Webhook Integrate Markdown and Lemlist Trigger and Sticky Note and OpenAI and LangChain and Slack and Lemlist and Http Request and Merge and Switch automatically usi...