Gmail to Slack, smarter inbox triage for teams
Your inbox isn’t “just email” anymore. It’s support requests, customer questions, investor threads, internal approvals, and a pile of newsletters pretending to be urgent.
This Gmail Slack triage problem hits Ops leads first because everything funnels to them, but client-facing teams and agency owners feel it too. When you miss one follow-up, you don’t just lose time. You lose trust.
This n8n workflow summarizes new Gmail messages with AI, labels them by intent and urgency, logs them in Google Sheets, then pushes the right updates into Slack. You’ll see how it works, what you need, and what results to expect once it’s running.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Gmail to Slack, smarter inbox triage for teams
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger1", pos: "b", h: 48 }
n1@{ icon: "mdi:message-outline", form: "rounded", label: "Get many messages", pos: "b", h: 48 }
n2@{ icon: "mdi:message-outline", form: "rounded", label: "Get many labels", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Message a model1", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If1", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Send a message2"]
n6@{ icon: "mdi:message-outline", form: "rounded", label: "Add label to message2", pos: "b", h: 48 }
n7@{ icon: "mdi:message-outline", form: "rounded", label: "Add label to message3", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Send a message3"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Calculate Intent"]
n10@{ icon: "mdi:database", form: "rounded", label: "Append row in sheet1", pos: "b", h: 48 }
n11@{ icon: "mdi:database", form: "rounded", label: "Append row in sheet2", pos: "b", h: 48 }
n12@{ icon: "mdi:database", form: "rounded", label: "Get row(s) from sheet2", pos: "b", h: 48 }
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Filter timestamp"]
n14["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Daily Digest Preparation"]
n15@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n4 --> n5
n4 --> n6
n15 --> n12
n2 --> n1
n5 --> n7
n9 --> n4
n13 --> n14
n3 --> n9
n1 --> n3
n0 --> n2
n11 --> n15
n6 --> n11
n7 --> n10
n12 --> n13
n14 --> n8
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n3 ai
class n4 decision
class n10,n11,n12 database
class n9,n13,n14 code
classDef customIcon fill:none,stroke:none
class n5,n8,n9,n13,n14 customIcon
The Problem: Inbox triage steals focus (and follow-ups)
If you’ve ever “quickly checked email” and surfaced 40 minutes later, you know the real cost. The time isn’t even the worst part. It’s the context-switching: read, decide urgency, figure out who owns it, then remember to follow up. Meanwhile, the truly urgent threads get buried under notifications and marketing blasts, and your team ends up forwarding screenshots in Slack like it’s 2016. You also lose the paper trail. When someone asks “Did we respond?” you’re searching, guessing, and hoping.
The friction compounds. Here’s where it breaks down in day-to-day work:
- You read the same email thread multiple times just to decide what to do with it.
- High-urgency messages don’t reliably reach the team channel, so response time depends on who checked Gmail last.
- Manual labeling and archiving falls apart after the first busy day, which makes “inbox zero” feel like a joke.
- No consistent log exists, so handoffs and retrospectives turn into detective work.
The Solution: AI triage from Gmail to Slack (plus Sheets logging)
This workflow runs on a schedule and pulls new Gmail messages from the last 4 hours. Each email gets analyzed by GPT-4, which returns a short summary plus structured fields like urgency (High, Medium, Low), intent (To Respond, Awaiting Reply, Notification, Marketing, FYI, and more), and a basic category (Customer, Investor, Support, Spam, Other). Then n8n applies the right Gmail label automatically using a predictable label format (like “AI Agent/To Respond”). If an email is high urgency, it posts an immediate Slack alert with the key details. Everything also gets logged to Google Sheets, so you have an audit-friendly trail and a simple way to build a digest.
After the logging step, the workflow waits about 30 seconds, reads the latest batch from a “digest” sheet tab, filters recent items, and composes a clean Slack summary for Medium and Low urgency messages. You get the fast escalation for emergencies, and a calm recap for everything else.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your shared inbox gets about 30 meaningful emails a day. If it takes even 2 minutes to read, decide urgency, label, and forward the important ones, that’s about an hour of triage daily, and it usually happens in distracting chunks. With this workflow, the “work” becomes a quick Slack review: high-urgency alerts show up right away, and the rest lands as a digest about once an hour. Realistically, most teams shrink that daily triage down to about 10 minutes of scanning and action.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Gmail for reading messages and applying labels.
- Slack to post urgent alerts and digest summaries.
- Google Sheets to keep an archive and digest log.
- OpenAI API key (get it from the OpenAI API dashboard).
Skill level: Intermediate. You’ll connect accounts, create Gmail labels, and map a few fields, but you won’t be writing an app.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A scheduled run kicks things off. n8n starts automatically every hour and looks back over the last 4 hours of Gmail activity, so you’re not relying on someone to remember to “run it.”
Messages and labels are pulled from Gmail. The workflow fetches your existing labels first (so it can match intent to the right label), then retrieves the recent messages that should be processed.
AI turns raw emails into structured decisions. GPT-4 analyzes each email and returns clean JSON fields like summary, urgency, category, and intent. A small logic layer in n8n uses that output to route “High urgency” differently from Medium and Low.
Slack gets the right kind of update. High urgency messages trigger an immediate Slack alert. Everything gets logged to Google Sheets, and then a second Slack message posts a digest that focuses on Medium and Low urgency items.
You can easily modify the schedule window (every hour, every 2 hours) to match your inbox volume based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to run on a 4-hour interval using the scheduled trigger that starts the pipeline.
- Add and open Scheduled Start.
- Set the schedule rule to an interval of
hourswith hoursInterval set to4. - Verify that Scheduled Start connects to Fetch Gmail Labels.
Step 2: Connect Gmail and Retrieve Recent Messages
This section pulls labels and recent emails to feed the AI classification pipeline.
- Open Fetch Gmail Labels and keep Resource set to
labeland Return All set totrue. - Credential Required: Connect your gmailOAuth2 credentials in Fetch Gmail Labels.
- Open Retrieve Gmail Messages and set Operation to
getAllwith Return All enabled. - Set Filters → Received After to
{{ new Date(Date.now() - 4 * 60 * 60 * 1000).toISOString() }}. - Credential Required: Connect your gmailOAuth2 credentials in Retrieve Gmail Messages.
Step 3: Set Up AI Classification and Intent Parsing
Analyze each email with GPT and normalize the JSON response into structured fields.
- Open Analyze Email with AI and select model
gpt-4o-mini. - Confirm the message prompt includes the subject and snippet:
Subject: {{ $json.Subject }}andBody: {{ $json.snippet }}. - Credential Required: Connect your openAiApi credentials in Analyze Email with AI.
- Open Derive Email Intent and keep Mode set to
runOnceForEachItem. - Ensure the code references labels from Fetch Gmail Labels and message IDs from Retrieve Gmail Messages as written in the node.
Step 4: Configure Urgency Routing and High-Priority Actions
High-urgency emails trigger an immediate Slack alert and are archived in a separate Google Sheet.
- Open Urgency Branch and set the condition to Left Value
{{ $json.urgency }}equalsHigh. - Open Slack Alert Post and set Text to
=*Important Email Detected* From: {{ $('Retrieve Gmail Messages').item.json.From }} *Summary:* {{ $('Derive Email Intent').item.json.summary }} *Urgency:* {{ $('Derive Email Intent').item.json.urgency }} , *Category:* {{ $('Derive Email Intent').item.json.category }}, *Intent:* {{ $('Derive Email Intent').item.json.intent }}. - Credential Required: Connect your slackOAuth2Api credentials in Slack Alert Post and choose the target channel.
- Open Apply Label High and set Operation to
addLabels, Label IDs to{{ $('Derive Email Intent').item.json.label_id }}, and Message ID to{{ $('Retrieve Gmail Messages').item.json.id }}. - Credential Required: Connect your gmailOAuth2 credentials in Apply Label High.
- Open Log to Sheet Archive and map columns using the existing expressions such as
{{ $('Retrieve Gmail Messages').item.json.From }}and{{ $now }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Log to Sheet Archive and select the document
N8N - Emailswith sheetSheet1.
Step 5: Configure Low/Medium Handling and Digest Preparation
Lower urgency messages are labeled, logged for a digest, and passed into a timed window for batching.
- Open Apply Label Low/Med and set Label IDs to
{{ $json.label_id }}and Message ID to{{ $('Retrieve Gmail Messages').item.json.id }}. - Credential Required: Connect your gmailOAuth2 credentials in Apply Label Low/Med.
- Open Log to Sheet Digest and map columns using the existing expressions, including
{{ $('Derive Email Intent').item.json.summary }}and{{ $now }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Log to Sheet Digest and select sheet
Sheet2inN8N - Emails. - Open Delay Window and set Amount to
30to create a digest batching window.
Step 6: Build and Post the Slack Digest
Read recent digest rows, filter by time and urgency, compile the message, and post to Slack.
- Open Read Digest Rows and select the document
N8N - Emailsand sheetSheet2. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Read Digest Rows.
- Open Filter Recent Items and keep the code that filters items within
0.5hours and urgencylowormedium. - Open Build Digest Text and keep the existing message formatting logic that builds
mediumandlowsections. - Open Slack Digest Post and set Text to
=🧠 *Inbox Assistant – Daily Digest* 📅 *{{ $now.format("DD : HH:mm") }}* ━━━━━━━━━━━━━━━━━━━ {{ $json.text }}. - Credential Required: Connect your slackOAuth2Api credentials in Slack Digest Post and choose the target channel.
Step 7: Test and Activate Your Workflow
Run a full test to confirm Gmail retrieval, AI analysis, Slack alerts, and digest posting all function as expected.
- Click Execute Workflow to run a manual test.
- Verify that Slack Alert Post fires for emails labeled as
Highurgency and that Apply Label High adds the correct Gmail label. - Check Log to Sheet Archive and Log to Sheet Digest for new rows with expected fields like Summary and Urgency.
- Confirm Slack Digest Post sends a digest message after Delay Window.
- When satisfied, switch the workflow to Active to enable scheduled runs.
Common Gotchas
- Gmail permissions can be the silent killer. If labels aren’t applying, check the Gmail credential scopes in n8n and confirm the labels exist exactly as named in Gmail settings.
- If you’re using Wait nodes or external processing, timing can be inconsistent. This workflow waits about 30 seconds before reading Sheet2; bump that up if the digest reads “empty” because rows haven’t landed yet.
- OpenAI prompts that are too generic produce bland summaries. Add your team’s language (what “urgent” means, what to ignore) early or you will be editing Slack posts every day.
Frequently Asked Questions
About 30 minutes if your accounts and Gmail labels are ready.
No. You’ll mostly connect accounts and copy the required Gmail label names exactly.
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 OpenAI API costs, which for short email summaries are usually a few dollars a month for many small teams.
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.
Yes, but keep it simple at first. You can swap the Slack destination by changing the Slack nodes that post the alert and digest, and you can adjust intent handling in the “Derive Email Intent” logic so certain senders always map to a specific label. Common customizations include “treat anything from @keycustomer.com as High,” sending investor emails to a private channel, and adding a “Meeting Update” label if your calendar noise is heavy.
Most of the time it’s an authorization or scope issue in the Gmail credential, or the workflow is trying to apply a label that doesn’t exist. Reconnect Gmail in n8n, confirm the label names match exactly (including slashes), and then re-run a manual test on a single email before turning it back on.
Plenty for a typical shared inbox.
Often, yes, because this workflow isn’t just “forward email to Slack.” It does classification, branching by urgency, Gmail labeling, and a two-part Google Sheets logging pattern (archive plus digest), which gets awkward and expensive in simpler automation tools. n8n also makes it easier to self-host if you want unlimited runs and tighter control. Zapier or Make can still be fine for a basic alert, honestly. If you’re on the fence, Talk to an automation expert and get a quick recommendation based on your volume and risk.
Once this is running, your team stops living in Gmail just to stay “caught up.” You’ll get the signal in Slack, keep the record in Sheets, and spend your attention on decisions instead of sorting.
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.