n8n

How to Automate HubSpot to Gmail Sales Outreach?

Create personal sales emails at scale without guesswork. The flow pulls contacts from your CRM, studies past emails in Gmail, builds a quick persona, and writes a tailored draft for each person. Great for sales teams that want faster outreach with real context.

It runs on demand and reads a target list from HubSpot. Each contact moves through a loop where the Variables step maps name, email, and the product you want to sell. Gmail pulls recent messages from that contact. An AI step using Google Gemini extracts traits like tone, decision style, and interests. A second AI step turns that persona into a subject line and HTML body. The email is saved as a Gmail draft so a rep can review and send.

You will need HubSpot, Gmail, and a Google Gemini API key. Set your product in the Variables node and refine the Gmail search so only useful messages are used. Teams often cut drafting time from 30 minutes per contact to 2 minutes and can process hundreds of contacts in one run. Use it for account based outreach, reactivation, and upsell follow ups.

What are the key features?

  • HubSpot contact pull with filters for targeted lists
  • SplitInBatches processes each contact one at a time for clean context
  • Variables node stores name, email, and product_to_sell for consistent prompts
  • Gmail fetches the customer’s recent messages for research
  • AI persona builder using Google Gemini extracts tone and decision style
  • AI email writer generates subject and HTML body tailored to the persona
  • Gmail creates a draft for human review before sending
  • Manual run control for safe testing and easy reruns

What are the benefits?

  • Reduce manual research from 30 minutes to 2 minutes per contact
  • Automate up to 80 percent of email drafting work
  • Connect CRM and email to remove copy and paste steps
  • Handle hundreds of contacts in one run with batching
  • Improve message relevance by using real customer language

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with HubSpot, Gmail and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, connect HubSpot: double click the Get Contacts node, choose 'Credential to connect with', click 'Create new credential', then follow the on screen steps to add your HubSpot Private App token.
  4. Connect Gmail for both Gmail nodes: open each Gmail node, choose 'Credential to connect with', click 'Create new credential', sign in to your Google account, and approve the requested Gmail scopes.
  5. Connect Google Gemini for both AI nodes: open each Google Gemini node, create a new credential, and paste your API key from the Google AI Studio API page. Keep the model set to gemini 2.0 flash.
  6. Configure the Get Contacts node in HubSpot: set any filters or properties you need for your target list so only the right contacts are pulled.
  7. Open the Variables node and set product_to_sell and any other fields you want the AI to reference. Confirm the email field maps to the HubSpot contact email.
  8. Adjust the Gmail Get All Customer's Correspondence node search. Use a query like from:{{email}} and add labels or date limits to avoid irrelevant or sensitive threads.
  9. Review the Analyse and Build Persona node attributes. Add or remove traits to match your sales style. Small edits here will change how the AI writes.
  10. Check the Generate Sales Email node. Make sure it returns subject and body and that the system prompt reflects your brand and product.
  11. Open the Gmail Create Draft node. Confirm sendTo uses the email from Variables and that emailType is set to HTML.
  12. Run the workflow using the manual trigger. Verify that drafts appear in your Gmail Drafts folder with the expected subject and body. If no drafts appear, check the Gmail query and contact email mapping.
  13. Troubleshoot tips: if you hit API limits, lower the batch size in SplitInBatches. If the AI returns empty fields, simplify the prompts or reduce attribute count. If messages include sensitive data, tighten your Gmail search filters.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

HubSpot

Sign up

Free: $0 / mo; API access included (private app or OAuth). Limits on Free: 250,000 API calls/day and 100 requests per 10 seconds per private app.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.