Overview
Build an n8n workflow that watches a sales inbox, classifies each new email, and for qualified leads proposes a HubSpot contact and deal that a person approves in Slack before anything is written.
Problem or Objective
- Which agents enrich, clean and update CRM records from research and conversations?
- Which agents sort email, draft replies and clear the backlog for you?
More in Sales, Marketing and Support
AI Agents and Models
Tools and Integrations
- Tools
- n8n · Gmail · HubSpot · Slack
- Prerequisites
- An n8n instance (cloud or self-hosted), Gmail and HubSpot credentials, a chat model API key, and a Slack workspace or other approval channel; check which CRM fields and deal stages your HubSpot account uses.
How It Works
In n8n, start with a Gmail Trigger on the sales inbox. Add a Text Classifier node with categories such as qualified lead, unqualified lead, support request and other, each with a short description of your qualification criteria. Send qualified leads to an AI Agent node with a chat model and the HubSpot node connected as its tool, and instruct it to search for an existing contact first, then propose a contact and a deal with the stage and a follow-up note. Turn on human review for the HubSpot tool so the workflow pauses and sends the proposed record to a person in Slack; only an approved request runs. Route support requests and other mail to a label or channel for a person to handle. Test it on a handful of past emails before activating it.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up n8n.
- Connect the toolsConnect the tools this workflow relies on: n8n, Gmail, HubSpot, Slack.
- Check the prerequisitesAn n8n instance (cloud or self-hosted), Gmail and HubSpot credentials, a chat model API key, and a Slack workspace or other approval channel; check which CRM fields and deal stages your HubSpot account uses.
- Gather your detailsCollect what the prompt asks for: What makes a lead qualified, How deals are named, Stage for new deals, Days until follow-up.
- Run the starter promptPaste the starter prompt below into n8n and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.n8n.io before you rely on it.
Practical Starter Prompt: Qualify a lead email and propose a CRM record
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
You receive one inbound sales email. Our ideal lead is [What makes a lead qualified]. Using the HubSpot tool, first search for an existing contact with the sender's email. Then propose either an update to that contact or a new contact, plus a deal named [How deals are named] in the stage [Stage for new deals], with a one-line follow-up note due in [Days until follow-up] days. The HubSpot tool requires human approval, so state clearly what you want to write and why; do not retry if the request is denied.Turn on human review for the HubSpot tool and route approvals to the person who owns the pipeline in Slack. Test on past emails before activating the workflow.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. n8n's docs cover each piece: polling Gmail for new messages, classifying text into your own categories, using the HubSpot node as an AI agent tool that can create deals, and requiring human approval before an agent runs a tool. How well leads are qualified depends on your category descriptions and on testing.
Limitations and Considerations
Keep human review on for the HubSpot tool so no contact or deal is written without approval, and check how your CRM handles duplicate contacts before going live. Only store contact details you have a lawful reason to keep, and follow your own retention rules. Check the other categories regularly for leads that ended up in the wrong place. Model calls and n8n hosting have their own costs. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Related Videos
About n8n-io/n8n
Give Your Agent Tools (n8n Agents Course 5/7) (opens in a new tab)
Walkthrough of n8n by n8n: it is on the project’s own channel.
Watch on YouTube (opens in a new tab)About n8n-io/n8n
n8n AI Nodes: Connect OpenAI, Claude, and Local Models (opens in a new tab)
Walkthrough of n8n by AI Daily Lab: its description links the GitHub repository.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Gmail Trigger | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 00:17 UTC
What this source supports
- Message Received : The node triggers for new messages at the selected Poll Time .
- Text Classifier | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 04:17 UTC
What this source supports
- Use the Text Classifier node to classify (categorize) incoming data.
- HubSpot | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 16:42 UTC
What this source supports
- n8n has built-in support for a wide range of HubSpot features, including creating, updating, deleting, and getting contacts, deals, lists, engagements and companies.
- This node can be used to enhance the capabilities of an AI agent.
- Human-in-the-loop for tools | Build | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 26 Nov 2026, 17:35 UTC
What this source supports
- You can make an AI agent wait for human approval, in Slack, n8n Chat, or another channel, before it runs a specific tool.

