Free n8n template

Customer onboarding emails n8n template

What it does

An importable n8n workflow in two parts. Every 15 minutes it finds HubSpot deals that moved to closed-won, skips any already started, has Claude write a short opener from the sales notes, and saves the welcome email as a Gmail draft plus an onboarding record. Every weekday morning it checks setup progress and alerts the owner in Slack when a customer stalls.

What this workflow does

  1. Every 15 minutes (Schedule Trigger) starts the new-customer check.
  2. Search closed-won deals (HTTP Request, HubSpot CRM search) returns closed-won deals modified in the last two days.
  3. Read onboarding state (Google Sheets) loads existing onboarding records.
  4. New customers only (Code) drops deals that already have a record, so a second closed-won event never starts a second sequence, and builds the prompt from the deal notes.
  5. Write opener with Claude (HTTP Request) returns strict JSON: a short opener, the goal it referenced and a safe_to_send flag. The prompt forbids pricing, discounts, contract terms and sales objections.
  6. Find deal contact (HTTP Request) searches HubSpot contacts associated with the deal.
  7. Compose welcome email (Code) checks the opener again in code (length and banned terms such as price or discount), falls back to a standard sentence if the AI failed or was rejected, and wraps it in your fixed email with setup links.
  8. Contact found? (If) creates a Gmail draft and an onboarding record, or alerts the team in Slack when the deal has no contact email. Those deals still get a record, marked needs_contact, so delete that row once you add the contact.
  9. Weekdays at 9am, Read onboarding records and Find stalled customers (Code) alert the owner when a customer has been stuck on the same setup step for four days, repeating every three days.

Before you import

  • A current n8n version.
  • A HubSpot private app token with read access to deals and contacts. HubSpot search endpoints have their own rate limits, so keep the 15-minute interval unless you need faster starts.
  • An Anthropic API key, the onboarding manager’s Gmail account, a Google Sheet and a Slack bot.

Setup

  1. Import the JSON and connect the HubSpot (on both HTTP nodes), Anthropic, Gmail, Google Sheets and Slack credentials.
  2. Create an Onboarding tab with headers: deal_id, company, contact_email, contact_first_name, owner_slack_id, start_date, status, ai_fallback, ai_note, step_account_created, step_data_imported, step_integration_connected, step_teammate_invited.
  3. Replace REPLACE_WITH_SHEET_ID on all three sheet nodes and REPLACE_WITH_SLACK_ONBOARDING_CHANNEL_ID.
  4. In New customers only, map HubSpot owner IDs to Slack member IDs in OWNER_SLACK.
  5. In Compose welcome email, replace the three REPLACE_WITH_..._URL links and REPLACE_WITH_SENDER_NAME.
  6. If your pipeline is not the default one, replace closedwon with your closed-won stage ID.
  7. Edit STEPS and STALL_DAYS in Find stalled customers to match your real setup events. Fill the step columns from product events or by hand.

Test it

Move a test deal with notes and an associated contact to closed-won, run the workflow manually, and check Gmail drafts and the sheet. Run it again and confirm no second draft appears. Then backdate a row’s start_date by four days and run the 9am branch.

Make it production-ready

  • Keep drafts for two weeks so the onboarding team sees what would have gone out, then switch the Gmail node to send.
  • Add a status value such as paused for custom implementations. The stall check skips anything not marked onboarding.
  • Move state to Postgres or your CRM once you have more than a few hundred active customers.
  • Add an n8n error workflow, and an activation check that sets status to activated to end the sequence.

Read the full guide on automating customer onboarding emails for step design and AI rules, or work with Lumeor to connect Stripe or your product database.

Next steps