Qualify inbound email leads with AI
Read new Gmail, classify with AI, create CRM records for real leads, and notify sales — an n8n workflow you can import.
Intermediate·~45 min·8 nodes
n8n · Gmail · OpenAI · Airtable · Slack
General Business · Professional Services · Marketing Agencies · SaaS·Sales · Lead Management
What this automation does
Instead of a salesperson opening every inbound email to decide whether it is a lead, this workflow reads the message, asks a model whether it is a sales opportunity, writes only the qualified ones to the CRM, and pings Slack. Newsletters, job ads, and out-of-office replies stay out of the pipeline.
When to use it
Use this workflow if:
- A shared inbox mixes real enquiries with noise, and someone sorts it by hand.
- Leads sit in Gmail until a person copies them into the CRM.
- Qualification rules live in someone’s head, so the bar changes by day.
- Sales only finds out about an email when they happen to check that label.
- You want a first-pass classifier before a person spends time on the thread.
Workflow overview
Trigger
Gmail reports a new message.
Validate
Sender, subject, and body are extracted into a stable shape.
Process
The model returns isLead, category, reason, and confidence.
Decision
Only messages flagged as leads continue.
Action
Airtable creates the CRM record from the classified email.
Notification
Slack tells sales who wrote and why it was classified as a lead.
Interactive flow
Pan, zoom, and click a node to inspect it. Use the buttons below the canvas to jump to a step.
n8n workflow JSON
Copy this workflow JSON and import it directly into n8n. You will still need to connect your own credentials and configure the services used by the workflow.
Import this workflow into n8n
- Copy or download the workflow JSON from this page.
- Open n8n and create a new workflow — or open an empty canvas.
- Use Import from File, or paste the JSON via the workflow menu.
- Connect your own credentials for every service the workflow uses.
- Replace the placeholder IDs, channels, tables, and folder names.
- Run a test with a sample payload before you activate it.
- Activate the workflow only after the test run looks correct.
Setup requirements
Accounts
- n8n
- Gmail
- OpenAI
- Airtable
- Slack
Credentials
- Gmail OAuth
- OpenAI API credential in n8n — never in this JSON
- Airtable personal access token
- Slack OAuth
Information
- Which inbox or Gmail label should be scanned
- Airtable base ID and Leads table fields
- Slack channel for qualified-lead alerts
- A short list of examples that are leads vs not, to tune the prompt
Step-by-step
Step 1 — Watch the inbox
The Gmail Trigger polls for new mail. Narrow it with a label if this address also receives receipts, newsletters, or support.
Step 2 — Extract sender and content
The Set node copies from, subject, body, and message id into fields the rest of the flow can rely on, even if the Gmail payload shape changes.
Step 3 — Classify with AI
The OpenAI node returns JSON: whether it is a lead, a category, a one-line reason, and a confidence score. Adjust the prompt to your offer.
Step 4 — Branch on the result
True continues to the CRM. False hits a no-op — a good place to add a Gmail label such as “not-a-lead”.
Step 5 — Create the CRM record and notify
Qualified messages become Airtable rows and a Slack line so sales does not have to watch the inbox.
Ways to extend this workflow
- Require a minimum confidence before writing to the CRM; send low-confidence mail to a review channel instead.
- Add a Gmail label or archive step on the non-lead branch.
- Extract a company name and domain, then enrich before the CRM write.
- Draft a first-reply email and hold it for approval instead of notifying only.
- Route categories (sales vs partnership vs press) to different owners.
- Log every classification — including skips — so you can audit the prompt.
- Swap Airtable for Pipedrive or HubSpot using the same classified payload.
Need this customized for your business?
This template is the starting point. If the workflow needs custom logic, several systems, error handling, or production monitoring, Syntropic Ops can design and implement it with you.