🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Gmail + Slack: smarter triage, faster replies

Lisa Granqvist Partner Workflow Automation Expert

Your inbox is doing two jobs at once. It’s receiving messages and acting like a ticketing system, which is why important emails get buried and “quick replies” turn into a whole afternoon.

Marketing managers feel it when leads sit too long. Support leads feel it when complaints get missed. And if you run a small team, you’re the one double-checking everything. This Gmail Slack triage automation routes messages to the right owner and keeps response quality consistent without living in your inbox.

You’ll see how this workflow classifies new emails, uses lightweight AI only when needed, and posts clear Slack alerts so the right person can act fast.

How This Automation Works

Here’s the complete workflow you’ll be setting up:

n8n Workflow Template: Gmail + Slack: smarter triage, faster replies

Why This Matters: Inbox triage breaks at scale

Handling email “as it comes in” works… until it doesn’t. One complaint lands at 9:05, a billing question at 9:07, a partnership request at 9:10, and suddenly you’re context-switching all morning. You skim, you guess the intent, you forward to someone, then you remember you never replied to the sender. The worst part is the mental load: you’re constantly wondering what you missed, not just what you answered.

It adds up fast. Here’s where it usually breaks down in real teams.

  • Messages get routed based on who happened to see them first, not who should own them.
  • Complaints and high-sentiment emails hide in the same inbox view as newsletters and vendor updates.
  • Reply quality drifts because everyone writes differently, especially under pressure.
  • Forwarding and “FYI” threads happen in email, so there’s no clean Slack trail for follow-up.

What You’ll Build: Email classification that routes to Slack (and replies)

This workflow watches your inbox for new messages using an IMAP email trigger, then pulls out the useful bits (sender, subject, and body) so the automation can make a decision quickly. First, it tries simple logic and lightweight classification to route obvious cases like billing, feedback, HR, sales inquiries, or complaints. When the email is ambiguous, it calls an LLM step to “guess” a category, normalizes that guess into a reliable label, and sends it back through the router so the right path runs. For inquiries, it can even use a retrieval step (optional Pinecone memory) to draft a helpful reply that matches your saved knowledge. The end result: the right team gets alerted, the sender gets an appropriate response, and you stop treating your inbox like a messy help desk.

The workflow starts the moment a new email hits your mailbox. It classifies and evaluates sentiment, then routes to outcomes like “notify sales,” “confirm complaint receipt,” or “send inquiry reply.” Only the hard-to-classify messages get AI help, which keeps costs and latency reasonable.

What You’re Building

Expected Results

Say your inbox gets about 30 meaningful emails a day (leads, complaints, billing, HR). Manually triaging usually takes maybe 3 minutes each to read, decide, and forward, which is about 90 minutes daily before anyone even starts real work. With this workflow, classification and routing happen automatically after the email arrives, and you only spend time on the messages that truly need a human. For most teams, that’s roughly an hour back per day, plus faster first responses.

Before You Start

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • IMAP-compatible email account to detect new incoming emails.
  • Slack to alert the right owner or channel.
  • OpenAI-compatible LLM credentials (get it from your LLM provider’s API keys page).

Skill level: Beginner. You’ll connect accounts, paste in a couple of prompts, and test with real emails.

Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).

Step by Step

A new email arrives in your mailbox. The IMAP listener triggers instantly when a message is received, then grabs the subject and body so the workflow can evaluate intent.

The workflow tries to classify it cheaply first. A small script and routing logic handle clear cases (billing, HR, sales, complaints, feedback) so you’re not paying for AI on every single email.

Ambiguous messages get an AI “second opinion.” An LLM chain makes a category guess, another small code step normalizes that output into a consistent label, and the email goes back through the same router so the correct branch runs.

Notifications and replies go out automatically. Depending on the category, the workflow sends an email response (like a complaint receipt or inquiry reply) and can alert teams in Slack so the right person owns the follow-up.

You can easily modify the categories and routing rules to match your team’s inbox reality. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Start Trigger

Use the manual trigger to ingest a sample document for Pinecone indexing and validate the file-processing path.

  1. Add Manual Start Trigger as the entry point and connect it to Download File Request.
  2. In Download File Request, set URL to https://www.dropbox.com/scl/fo/p05bb9t8o6ech9d1joj7s/AKJmlI3mlt3O8qSjGbroMLc?rlkey=m1h852ks0y2o1gmdmbk3uda1d&st=pk0pq820&dl=1 and ensure Response Format is file.
  3. Configure Extract PDF Text with Operation set to pdf and connect it to Clean Extracted Text.
  4. In Clean Extracted Text, keep the JavaScript logic that normalizes whitespace and outputs cleaned text.
  5. Connect Clean Extracted Text to Pinecone Upsert Store to index the cleaned document.

Step 2: Connect the Email Ingestion Trigger

Set up the email intake path so new messages are categorized and routed automatically.

  1. Add IMAP Email Listener and enable Download Attachments set to true.
  2. Credential Required: Connect your IMAP credentials in IMAP Email Listener.
  3. Connect IMAP Email Listener to Subject Classifier Script to begin categorization.

⚠️ Common Pitfall: IMAP connections often fail due to missing app passwords or blocked IMAP access—verify your email provider’s IMAP settings before testing.

Step 3: Set Up Category Classification and Fallback AI

This step assigns a category based on subject keywords and falls back to an LLM when needed.

  1. In Subject Classifier Script, keep Mode set to runOnceForEachItem and the provided JavaScript for keyword-based categorization.
  2. Configure Category Router rules using expressions like ={{$json["category"]}} and route to outputs hr, billing, complaint, feedback, inquiry, sales, and unknown.
  3. Set up LLM Category Guess with the prompt text exactly as shown, including {{ $json["subject"] }} and {{ $json["body"] }}.
  4. Attach Groq Chat Engine as the language model for LLM Category Guess and set Model to llama-3.3-70b-versatile.
  5. Credential Required: Connect your Groq credentials in Groq Chat Engine (LLM provider for LLM Category Guess).
  6. Ensure LLM Category Guess outputs to Normalize AI Category, which returns unknown for unexpected categories.

Step 4: Configure HR Screening and Decision Logic

Route HR-related emails through an LLM-based screening decision and notify candidates and HR accordingly.

  1. In HR Screening Prompt, keep the prompt template and ensure {{ $json["emailText"] }} is used for candidate content.
  2. Connect Groq HR Engine as the language model for HR Screening Prompt.
  3. Credential Required: Connect your Groq credentials in Groq HR Engine (LLM provider for HR Screening Prompt).
  4. In Decision Parser Script, keep the logic that sets decision based on whether the AI response starts with accept.
  5. Configure Decision Brancher to branch on ={{ $json[decision] }} for accept and reject.
  6. Confirm Decision Brancher routes to Acceptance to Candidate (and then Notify HR Team) or Send Rejection Notice.

Step 5: Build Inquiry Responses and Feedback Sentiment

Automate responses to inquiries using RAG and analyze feedback sentiment for publishing and alerts.

  1. Configure RAG Inquiry Responder with the provided prompt and ensure context uses {{ $json["vectors"].map(v => v.metadata.text).join("\n\n") || "No context available." }}.
  2. Attach Groq Reply Engine as the language model for RAG Inquiry Responder.
  3. Credential Required: Connect your Groq credentials in Groq Reply Engine (LLM provider for RAG Inquiry Responder).
  4. Connect Pinecone Retriever Tool as the tool for RAG Inquiry Responder with Tool Name knowlagebase and Tool Description company dock.
  5. Credential Required: Connect your Pinecone credentials in Pinecone Retriever Tool.
  6. In Feedback Sentiment Check, set Input Text to = {{ $json.textPlain }} and ensure categories include Positive, Neutral, Negative.
  7. Attach Groq Sentiment Engine as the language model for Feedback Sentiment Check.
  8. Credential Required: Connect your Groq credentials in Groq Sentiment Engine (LLM provider for Feedback Sentiment Check).
  9. Feedback Sentiment Check outputs to both Post to X Feed and Notify Feedback Team in parallel.

Step 6: Configure Pinecone Indexing and Embeddings

Load documents, split them, and embed content for retrieval in the inquiry responder.

  1. Set Recursive Text Splitter and Default Document Loader to their defaults and ensure they flow into Pinecone Upsert Store via their AI connections.
  2. In Pinecone Upsert Store, set Mode to insert and select your Pinecone Index value (e.g., [YOUR_ID]).
  3. Credential Required: Connect your Pinecone credentials in Pinecone Upsert Store.
  4. Configure Cohere Multilingual Embed with Model Name embed-multilingual-v3.0 and connect it as the embedding model for Pinecone Upsert Store.
  5. Credential Required: Connect your Cohere credentials in Cohere Multilingual Embed.
  6. Configure Cohere Embedding Model with Model Name embed-english-v3.0 and connect it as the embedding model for Pinecone Retriever Tool.
  7. Credential Required: Connect your Cohere credentials in Cohere Embedding Model.

Step 7: Configure Notifications and Outbound Actions

Set up all email and social outputs to deliver category-specific notifications.

  1. Connect Post to X Feed with Text set to =Another happy customer said: " {{ $json.textPlain }}".
  2. Credential Required: Connect your Twitter credentials in Post to X Feed.
  3. Connect SMTP credentials to all emailSend nodes (9 nodes including Send Inquiry Reply, Confirm Complaint Receipt, Alert Support Staff, Forward Billing Email, Notify Sales Crew, Notify Feedback Team, Acceptance to Candidate, Send Rejection Notice, and Notify HR Team).
  4. Validate dynamic recipient expressions such as ={{ $('IMAP Email Listener').item.json.from }} in Send Inquiry Reply and Acceptance to Candidate.

⚠️ Common Pitfall: Several fromEmail fields use {{ demo_from_email } (missing closing braces). Correct these to {{ demo_from_email }} before going live.

Step 8: Test and Activate Your Workflow

Run end-to-end tests for both the document ingestion path and email categorization flow before activating.

  1. Click Execute Workflow and trigger Manual Start Trigger to verify Download File RequestExtract PDF TextPinecone Upsert Store completes successfully.
  2. Send a test email to the inbox used by IMAP Email Listener and confirm it flows through Subject Classifier Script, Category Router, and the appropriate output branch.
  3. Check that Feedback Sentiment Check sends to Post to X Feed and Notify Feedback Team as expected.
  4. When satisfied, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Troubleshooting Tips

  • IMAP and Gmail credentials can expire or need specific permissions. If things break, check your email provider’s “app passwords” or IMAP access settings first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Quick Answers

What’s the setup time for this Gmail Slack triage automation?

About 10–15 minutes if your credentials are ready.

Is coding required for this Gmail Slack triage automation?

No. You’ll mainly connect accounts and adjust a few prompts and routing rules.

Is n8n free to use for this Gmail Slack triage workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in LLM API costs, which are usually just a few cents per batch of classifications depending on volume.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I modify this Gmail Slack triage automation for different use cases?

Yes, and you probably should. You can change the categories in the Category Router (switch) and update the “LLM Category Guess” prompt so it matches your labels and handoff rules. Common customizations include splitting “sales” into demo vs. partner inquiries, adding a VIP sender list that always alerts Slack, and swapping the reply templates used by the Send Inquiry Reply and Confirm Complaint Receipt nodes.

Why is my Gmail connection failing in this workflow?

Usually it’s expired credentials or a missing permission scope on the Gmail connection. Reconnect the Gmail account in n8n and confirm IMAP access is enabled if you’re using the IMAP listener instead of a native Gmail trigger. If it works for a bit and then fails, rate limits or security checks from your Google workspace can also be the culprit, especially on shared inboxes.

What volume can this Gmail Slack triage automation process?

A typical setup can comfortably handle dozens to a few hundred emails per day, and if you self-host there’s no execution cap beyond your server capacity.

Is this Gmail Slack triage automation better than using Zapier or Make?

For this workflow, n8n has a few advantages: more complex logic with unlimited branching at no extra cost, a self-hosting option for unlimited executions, and native AI/sentiment-style steps that are easier to control once you start routing edge cases. It also makes it simpler to “try rules first, then call AI,” which keeps costs predictable. Zapier or Make can be totally fine for simple “label then notify” flows, but they get clunky when you add fallback logic, normalized categories, and multiple response paths. Talk to an automation expert if you’re not sure which fits.

Once this is running, your inbox stops being a guessing game. The workflow handles the repetitive sorting and nudging, so your team can focus on the conversations that actually matter.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal