Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Email to HubSpot Lead Capture
4
Views
0
Downloads
13
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Sales
Automation Orchestrator
n8n
Integrations
OpenAI
IMAP Email
HubSpot
Trigger Type
On app event
Approx setup time ≈ 45 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Email to HubSpot Lead Capture?

Leon Petrou
FREE TEMPLATE
Automate Email to HubSpot Lead Capture
4
Views
0
Downloads
13
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
Sales
Automation Orchestrator
n8n
Integrations
OpenAI
IMAP Email
HubSpot
Trigger Type
On app event
Approximate setup time ≈ 45 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Turn inbound emails into clean CRM records. Sales teams get contacts created and each message logged as an engagement in the CRM, without typing. Great for handling contact requests and demo emails.

An email inbox watched by IMAP receives a new message. An AI model reads the email and pulls key details like name, email, phone, company, and location into a structured JSON. The flow checks HubSpot for a matching contact by email. If found, it maps the HubSpot contact id and records the email as an engagement. If not found, it creates the contact first, then adds the engagement with the original subject and body. The setup uses an OpenAI chat model with a defined output schema to keep fields consistent.

You will need access to an IMAP email inbox, a HubSpot account with OAuth, and an OpenAI API key. Expect faster lead intake, fewer typos, and complete timelines in HubSpot. Good fits include inbound sales requests, replies to outreach, and leads sent by third party forms that forward email. After connecting credentials, test by sending a sample email and check that the contact and engagement appear in HubSpot.

Copy link

Tools Required

OpenAI
Sign up
Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
IMAP Email
Sign up
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.

What this workflow does?

  • IMAP email listener captures new messages as they arrive
  • OpenAI chat model extracts names, emails, phones, and company details
  • Structured output parser enforces a consistent JSON schema
  • HubSpot contact search prevents duplicates using email matching
  • Conditional path creates a new contact if none is found
  • Email engagement is created with the original subject and body
  • Field mapping step passes the HubSpot contact id to link the engagement
  • Works with HTML or plain text emails using a safe fallback

What are the benefits?

  • Reduce manual data entry from 20 minutes to 2 minutes per lead
  • Automate up to 90% of CRM logging for inbound emails
  • Improve contact data accuracy by 40% with structured AI parsing
  • Handle 5 times more lead emails without adding headcount
  • Connect email and HubSpot so every message is tracked in one place

How to set this 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, OpenAI and IMAP Email. See the Tools Required section above for links to create accounts with these services.
  3. Open the IMAP Email node named When an email is received. In the credentials dropdown, click Create new credential and follow the on screen instructions. Provide server, port, encryption, username, and app password if required. Choose the inbox folder you want to watch.
  4. Double click the OpenAI Chat Model node. In the credentials dropdown, click Create new credential, paste your OpenAI API key from the OpenAI account API page, and save. Keep the model as gpt 4o mini or select another model you prefer.
  5. Review the Parse the mail with AI node. Keep the system message and prompt, or adjust the prompt to match your lead fields. Make sure the email content variables include both HTML and plain text.
  6. Open the Set the output Json node. Confirm the example schema includes contact fields you want like first name, last name, email, phone, company, and location. Adjust field names to match your CRM naming style if needed.
  7. Open each HubSpot node. In the credentials dropdown, click Create new credential and complete HubSpot OAuth. Grant CRM scopes so contact search, create, and engagement create all work.
  8. In the Search for the contact via email node, confirm the filter uses the AI parsed email field. Keep the email property name set to email.
  9. Check the contact exists decision node. The true path should set the contact id field and then create the engagement. The false path should create the contact first, then create the engagement.
  10. Open the Creates an email engagement node. Confirm the subject and body map from the email trigger. Verify the associations field uses the HubSpot contact id so the engagement links to the right record.
  11. Run a test: send a sample lead email to the watched inbox. In n8n, execute once or activate the workflow. Confirm that a contact appears in HubSpot and that the email is logged as an engagement. If fields are empty, refine the AI prompt or update the output schema.
  12. Troubleshoot common issues: if IMAP does not connect, check server, port, and app password. If HubSpot fails, reauthorize OAuth scopes. If the AI output is missing fields, add examples to the schema and reduce ambiguous wording in the prompt.

Need help or want to customize this?

Similar Templates

n8n
Sales
Automate Google Sheets LinkedIn Email Enrichment
Stop hunting for emails by hand. This flow reads LinkedIn profile links stored in a Google Sheet, finds contact details using an email finder service, and writes the results back into the sheet. Great for sales teams building clean prospect lists for outreach. A scheduled trigger runs every few minutes. It pulls rows from Google Sheets, checks which records still need enrichment, then calls the Prospeo email finder with the LinkedIn URL and the row ID. The response is merged with the original row and mapped into clear fields like name, gender, email, skills, picture, and a success flag. Rows that do not match the rule are skipped through a no operation path, so you avoid double work and keep the data tidy. Setup is simple. Connect your Google account, add your Prospeo API key, and match your column names to the fields used here. Expect faster list building, fewer errors, and better reply rates once valid emails replace missing data. Useful for SDR teams, recruiters, and small agencies that manage prospects in Google Sheets and need steady enrichment on a schedule.
9 views
view
n8n
Sales
Automate Google Sheets Email Prospecting
Stop hunting emails one by one. Start a bulk email search from a simple Google Sheets list and get results delivered to your inbox and the Icypeas app. Built for sales teams and founders who manage prospect lists in spreadsheets. You click run to start. The Google Sheets node reads last name, first name, and company from your sheet. A code node adds your Icypeas key, secret, and user id, then creates a signature and timestamp. The HTTP Request node sends one bulk job with task set to email search, your user id, and the sheet data. Auth uses a custom Authorization header made from your key and signature, plus an X ROCK TIMESTAMP header. Results are not returned to n8n. You receive a message in the Icypeas app and an email when the file is ready. Set up a sheet with the three headers before you run it. Add your Icypeas credentials in the code node, then create the header credential in the HTTP Request node using the expression shown in the template. Expect list research time to drop from hours to minutes and let junior reps handle larger lists without extra training. Useful for outbound prospecting, event lead clean up, and quick list validation.
8 views
view
n8n
Sales
Automate OpenAI Prospecting Emails
Collect a prospect’s name and company, find their profile and website, and send a tailored follow up email in minutes. Great for sales teams that want fast research and clear next steps without switching tabs. A simple form starts the flow. The workflow builds Google searches for LinkedIn and the company site, fetches the result pages with Bright Data, then extracts page content. OpenAI reads those pages to pull structured details for the person and the company. Filters keep only the best match and stop if nothing fits. If a match is found, both data sets are merged and OpenAI writes a follow up that ties the person’s role to the company context. The email is sent over SMTP and the form confirms the result. You need Bright Data, an OpenAI API key, and an SMTP email account. Set your country in Bright Data if you care about local results, and map your form email field to the email node. Expect a sharp drop in research time, often from 20 minutes to under 3 minutes per lead. This works well for SDR teams, founders doing outreach, and agencies that qualify leads before a first call.
9 views
view
See More Templates

Credits: Thomas at thomas@pollup.net - these templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution. If you are the author and would like this template removed from the template library, email us at info@futurise.com and we will remove it promptly.