Researched: Sourced and summarized, not yet run end-to-end by us CRM

Email classification: sort lead replies into Pipedrive follow-ups (n8n)

Last checked: · Sourced and summarized; not yet run end-to-end by us. What this means

At a glance

Setup estimate
1–2 h (ESTIMATE)
Tools
Industries
General (any small business)
View source template on n8n.io (opens in new tab)

Problem

Replies sit unread and follow-up tasks are created inconsistently

Who it's for

B2B service firms, agencies and small sales teams that prospect by email from Gmail and track people and deals in Pipedrive. The trigger: replies from leads sit in the inbox, and follow-up tasks get created late or not at all, so you want each reply classified (meeting request, pricing question, later, not interested) and turned into the right Pipedrive activity with a heads-up to the deal owner.

Skip it if your sales inbox is also your general inbox, unless you add a filter first: the trigger reacts to every inbox email. Also skip it if an AI marking deals as lost on its own is unacceptable.

Tools and what each does

Gmail Trigger
Polls the INBOX label every minute for new mail.
Set Email Details
Cleans the Gmail snippet and pulls out the subject, sender email and sender name.
Pipedrive (search person) + If
Looks the sender up by email; no match sends a 'Lead Reply Requires Manual Review' email to a reviewer.
OpenAI (gpt-4o in the template)
Classifies intent, buying stage, sentiment, urgency, summary, recommended action, follow-up date and confidence as JSON. The prompt defines ten intents, including Interested, Wrong Contact and Budget Constraint.
Switch: Route by Lead Intent
Sends Meeting Request, Pricing Inquiry, Follow Up Later and Not Interested to four branches.
Pipedrive (activities, deal update, note)
Creates a Meeting, Call or Mail activity, or marks the deal lost with the AI's summary as the reason, then adds a note with the full analysis.
Slack + Gmail
Send the deal owner a Slack message and an internal email summary.

Browse by tool: n8n, Gmail, OpenAI, Pipedrive, Slack

Steps

  1. A new email arrives in the Gmail inbox and is picked up within a minute.
  2. Sender name, email, subject and snippet are extracted and cleaned.
  3. Pipedrive is searched for a person with that email; if none, a reviewer gets an alert email and the run stops.
  4. OpenAI classifies the reply and returns JSON, which a Code node parses and normalizes.
  5. In parallel, Slack and an internal email go out with the analysis.
  6. The Switch routes by intent: Meeting Request creates a 'Schedule Discovery Call' meeting; Pricing Inquiry a 'Share Pricing Information' call; Follow Up Later a mail task; Not Interested sets the deal to lost.
  7. A Pipedrive note records intent, stage, sentiment, urgency, summary and recommended action.

Known problems in the source template

Found by reading the template's JSON, not by running it. Likely fails as shipped.

  • Problem: Only four of the ten intents have a branch. Interested, Information Request, Wrong Contact, Competitor Mention, Budget Constraint and Project Delayed go to an unconnected fallback, so no Pipedrive task is created for them (Slack and email still fire).

    Fix: Connect the remaining intents (or the fallback output) to a task step.

  • Problem: In the shared JSON, the activity and deal-update nodes don't map a deal or person ID, so tasks may not attach to the right deal and the 'lost' update has no deal to act on until you wire in the matched person's deal.

    Fix: Map the matched person's deal ID into the activity and deal-update nodes.

  • Problem: The internal summary email reads fields (owner_email, person_name) that the step before it doesn't provide, so it's likely to go to the fallback '[email protected]' with blanks. Set the address yourself.

    Fix: Pass owner_email and person_name from the Pipedrive search, or set the address yourself.

Before you start

  • Gmail OAuth2 for the trigger and the sending nodes.
  • A Pipedrive credential that can search persons, create activities, update deals and add notes, with activity types Meeting, Call and Mail matching your Pipedrive setup.
  • An OpenAI credential, Slack OAuth2 and a target user or channel, and the reviewer address for unmatched senders.
  • Setup estimate: 1–2 h (ESTIMATE).

What can go wrong

Recently published template (September 2026). Checks Gmail every minute, so watch API usage. Lead emails are sent to OpenAI for classification, and replies classified "Not Interested" mark the deal as lost automatically, so review the AI's calls.

  • ReliabilityRecently published (n8n.io shows Sept 28, 2026, with almost no views when checked), so there's no track record yet.
  • ReliabilityClassification uses the Gmail snippet, which the Gmail API describes as a short part of the message text, not the full reply. Longer replies can be misread.
  • Rate limitPolling every minute and reacting to every inbox email (newsletters, receipts) means many Pipedrive searches and reviewer alerts. Watch Gmail and Pipedrive API usage.
  • Data privacyLead emails go to OpenAI, and 'Not Interested' replies mark deals as lost automatically. Review the AI's calls.
  • Modelgpt-4o is listed for removal from OpenAI's API on Jan 14, 2027; OpenAI recommends gpt-6-luna.

How to adapt it

  • Narrow the trigger with a Gmail label or search (for example only replies to your outreach threads) so ordinary mail never reaches Pipedrive or OpenAI.
  • Connect the Switch fallback to a generic 'Review reply' activity so every intent creates a task.
  • Replace the automatic 'lost' update with a task asking the owner to confirm.
  • Fetch the full message body with a Gmail 'get message' step before classifying.
  • Post to a team channel instead of a single Slack user if deals are shared.

Sources we checked

Status
Researched: Sourced and summarized, not yet run end-to-end by us
Last checked
Details checked

Setup estimates are rough guesses for someone comfortable with the tools who already has the accounts and API keys. Real time is unknown until tested.

Practical AI workflows for small businesses, every Tuesday

A few workflows each issue for lead follow-up, CRM, proposals, onboarding and support, each labeled Researched or Tested.

We'll email you a link to confirm. Unsubscribe in one click. Privacy policy.

Why trust it: every entry links its source and caveats, and nothing is called Tested until we publish the logs. Our method.

More CRM workflows

Researched: Sourced and summarized, not yet run end-to-end by us CRM

AI lead scoring and routing into HighLevel

Form leads land in a sheet with no prioritization, and sales responds late

Setup: 1–2 h (ESTIMATE) Checked 2026-10-18

  • n8n
  • Google Sheets
  • Azure OpenAI
  • HighLevel
Researched: Sourced and summarized, not yet run end-to-end by us CRM

Daily AI summary of the Pipedrive pipeline

Owners don't have time to review every deal and note

Setup: 30–60 min (ESTIMATE) Checked 2026-10-18

  • n8n
  • Pipedrive
  • OpenAI