AI

The Inbound Lead Triage Playbook: GPT-4, Slack, and n8n

How to build an AI-powered lead routing system that reads every inbound email, classifies intent, and delivers a reply draft to Slack in under 2 minutes — without touching a shared inbox.
7 minutes to read2 months agoIgnasius Sevandri
June 18, 2026

What this solves

Sales teams with a shared inbox have a prioritisation problem. High-intent leads — someone asking for a demo, requesting pricing, or coming in from a referral — sit next to low-priority noise: newsletter replies, spam that cleared the filter, old threads someone revived. The inbox doesn't discriminate by value.

SDRs end up triaging before they can actually sell. The first hour of every working day is inbox archaeology. High-intent leads sit unread while low-priority emails get actioned first because they arrived earlier.

This playbook builds a system that eliminates inbox triage. Every inbound email is classified by AI, routed to the right Slack channel, summarised, and given a suggested reply. Your SDR opens Slack, sees what matters, and acts — without opening the inbox.

Architecture overview

Inbound email
    → Email monitoring trigger (n8n)
    → GPT-4 classification + summarisation
    → Slack routing (channel by intent)
    → Reply draft attached
    → Low-priority: logged + batched for end-of-day review

Three outputs from the system:

  1. High-intent leads → Routed immediately to #leads-hot with full context and a draft reply the SDR can send in one click
  2. Mid-priority (general inquiries, follow-ups) → #leads-queue with summary, no draft required
  3. Low-priority / noise#leads-archive or discarded, depending on your setup

Setting up the email trigger

n8n has two options for monitoring email: IMAP polling and webhook-based triggers. IMAP polling checks the inbox on a schedule (every 1–2 minutes is reasonable). A dedicated inbound mailbox works better than a shared inbox — route all web form submissions, contact page emails, and tracked inbound domains to a single address your automation monitors.

If you're using Gmail, connect via the Gmail OAuth2 node. Configure it to watch for unread messages in a specific label (create a leads/unprocessed label and point all inbound routes there). After the workflow processes a message, mark it as read and apply a leads/processed label. Never delete — you'll want the audit trail.

For webhook-based ingestion (better for low latency), use a service like Postmark or Resend's inbound parsing to turn incoming emails into a JSON POST to your n8n webhook. This avoids IMAP polling delays and doesn't require persistent inbox credentials.

The GPT-4 classification prompt

The classification node sends the email subject + body to GPT-4. Keep the prompt tight — you want consistent structured output, not a narrative response:

You are a sales triage assistant. Classify this inbound email and return JSON only.

Email:
Subject: {subject}
Body: {body}

Return this exact JSON structure:
{
  "intent": "demo_request" | "pricing" | "referral" | "general_inquiry" | "follow_up" | "noise",
  "priority": "high" | "medium" | "low",
  "company": "company name or null",
  "summary": "one sentence, max 20 words",
  "suggested_reply": "2-3 sentence reply draft or null if priority is low",
  "reasoning": "one sentence explanation of classification"
}

Intent definitions:
- demo_request: explicitly wants a demo, trial, or call
- pricing: asking about cost, packages, or ROI
- referral: mentions a mutual contact or was referred
- general_inquiry: genuine question not in above categories
- follow_up: responding to a previous interaction
- noise: spam, irrelevant, automated, or newsletter

Use gpt-4o (not gpt-4-turbo) for this — the structured output is more reliable and the cost difference for email-sized inputs is negligible. Set temperature to 0 for consistent classification.

Parse the JSON response in a subsequent Code node. Always handle parse failures — if GPT-4 returns malformed JSON, fall back to routing to #leads-queue with the raw email rather than crashing the workflow.

The Slack routing node

n8n's Slack node lets you send a formatted message to a specific channel. Build the message blocks dynamically based on the classification result:

const priorityEmoji = {
  high: '🔴',
  medium: '🟡', 
  low: '⚪'
};
 
const channel = classification.priority === 'high' 
  ? 'leads-hot' 
  : classification.priority === 'medium'
  ? 'leads-queue'
  : 'leads-archive';
 
const blocks = [
  {
    type: 'header',
    text: { type: 'plain_text', text: `${priorityEmoji[classification.priority]} ${classification.intent.replace('_', ' ').toUpperCase()}` }
  },
  {
    type: 'section',
    text: { type: 'mrkdwn', text: `*From:* ${senderName} <${senderEmail}>\n*Company:* ${classification.company ?? 'Unknown'}\n*Subject:* ${subject}` }
  },
  {
    type: 'section',
    text: { type: 'mrkdwn', text: `*Summary:* ${classification.summary}` }
  }
];
 
if (classification.suggested_reply) {
  blocks.push({
    type: 'section',
    text: { type: 'mrkdwn', text: `*Suggested reply:*\n\`\`\`${classification.suggested_reply}\`\`\`` }
  });
}

Add a direct link to the original email thread in the message. SDRs need to reply from the actual email client — the Slack message is a routing and drafting tool, not a reply interface.

Handling the low-priority batch

Low-priority and noise emails shouldn't clutter Slack. Two approaches:

Discard noise outright. If confidence is high (e.g., recognised spam headers, no-reply address, unsubscribe link in body), skip the Slack message entirely. Log to a Google Sheet for weekly review — someone should sanity-check that you're not discarding real leads.

Batch the low-priority. Collect all low-priority leads during the day and send a single daily summary to #leads-digest at 4pm. This gives reps visibility without interrupting the flow with individual messages.

CRM logging

Every inbound email that's not discarded as noise should create or update a record in your CRM. For GHL:

  1. Search for existing contact by email address: GET /contacts?email={email}
  2. If found: add a note with the AI summary and intent classification
  3. If not found: create a new contact with source tag inbound-email-ai-triage

Store the AI classification result as a contact note, not just a tag. Tags are good for filtering; the note gives context when a human opens the record: "AI classified this as a pricing inquiry. Summary: asking about ROI for a 50-person team."

Calibrating the classifier

A fresh deployment will make classification mistakes. Budget two weeks of daily review to catch the patterns:

  • False positives on high-priority: Out-of-office replies from known clients classified as follow-ups. Fix: check for X-Auto-Reply: yes header before sending to GPT-4.
  • Noise miscategorised as leads: Email marketing platforms sending HTML-heavy messages. Fix: strip HTML to plain text before sending to GPT-4; add sender domain blocklist.
  • General inquiry vs. demo request ambiguity: Someone saying "I'm interested in learning more" reads differently than "I'd like to schedule a demo." Add examples to your prompt for the boundary cases you observe.

GPT-4's classification improves dramatically with examples in the prompt. After two weeks of manual review, add the 5–10 most common miscategorisations as few-shot examples. Classification accuracy will jump.

What "done" looks like

Before going live:

  • Test inbox monitoring with a test email — confirm it appears in n8n execution log
  • Test each intent category — send representative emails, verify correct channel routing
  • Verify CRM contact creation/update for new and existing contacts
  • Test failure handling — send a malformed test to confirm fallback routing
  • Brief your SDR team — explain what the system does, what they'll see in Slack, and that the inbox no longer needs daily triage
  • Set up monitoring — alert if n8n hasn't processed an email in more than 15 minutes during business hours

The most common launch blocker: SDRs still checking the inbox out of habit. Give it two weeks before evaluating containment. Old habits take time to break.

Metrics to track

  • Processing latency: Time from email received to Slack message. Should be under 2 minutes for IMAP polling, under 30 seconds for webhook ingestion.
  • Classification accuracy: Weekly manual spot-check of 20 random emails. Target

    90% correct classification by week four.

  • High-priority response time: Time from Slack message to first SDR reply. This is the metric that matters for lead conversion — not automation speed, but rep behaviour change.
  • Discarded volume: How many emails hit the noise bucket per week. A sudden spike means either your blocklist is too aggressive or you've been added to a spam campaign.

Newsletter

Automation Playbooks, Delivered

New playbooks and build logs on AI automation — no fluff, no cadence pressure. When something is worth sharing, it lands in your inbox.