Automated Email Triage with Gmail, GPT-4o, and Slack Urgency Notifications
Hourly Email Summary: This agent scans your inbox every 4 hour and summarizes new emails into a clean, actionable Slack message. Powered by GPT-4, it classifies emails by Urgency (High, Medium, Low) and Intent (Awaiting Reply, To Respond, Comment, Notification, Marketing). No more inbox FOMO — just what you need to act fast.
Main Use Cases: • Stay on top of important threads without refreshing your inbox constantly • Prioritize tasks and replies based on urgency and context • Catch missed follow-ups by surfacing emails that need a response • Filter out noise like marketing emails or low-priority notifications • Enable async decision-making by keeping the team updated on critical emails via Slack • Reduce cognitive load by letting AI handle sorting and triaging ⸻
✅ Steps to Use Connect Your Accounts: Add your Gmail, Slack, Google Sheets, and OpenAI credentials inside n8n. Create Gmail Labels (Required): Go to your Gmail settings and create labels matching the following format: AI Agent/To Respond, AI Agent/Awaiting Reply, AI Agent/Notification, AI Agent/Marketing, etc. These are used by the workflow to auto-tag emails based on intent. Create a Google Sheet with 2 Tabs • Name the sheet something like “N8N - Emails”. • Add two sheets/tabs inside: • Sheet1 → stores all processed emails • Sheet2 → stores only the latest batch for digest view • In both sheets, add these columns (first row): From | Summary | Intent | Category | TimeStamp | Urgency Import the Workflow: Upload or paste the .json file into your n8n instance. Make sure each node is linked to your active credentials. Configure Slack Channel: In the Slack node, select the channel where you want urgent alerts and digest summaries to be posted. Adjust Schedule (Optional): Default: runs every hour. You can tweak this to suit your preference (e.g., every 30 min or 2 hours). Run a Test: Execute manually once to check: • Emails are getting processed • Labels are added correctly in Gmail • Slack notifications are triggered • Data is logged in Google Sheets Turn It On • Once everything looks good, activate the workflow. • Your inbox will now be triaged in real-time — sorted, labeled, summarized.
Step-by-Step Breakdown: ⏰ Schedule Trigger: Runs every hour to kick off the workflow automatically. 📩 Fetch Emails & Labels • Pulls all Gmail messages received in the last 4 hours. • Also fetches Gmail labels to use for tagging messages based on intent. 🤖 Analyze with GPT-4 • Each email is analyzed using GPT-4. • Output includes: • Summary • Urgency: High, Medium, Low • Intent: To Respond, Awaiting Reply, Marketing, Notification, etc. • Category: Customer, Investor, Spam, etc. Classify and Label • Emails are tagged with the right intent label inside Gmail. 5.🚨 Slack Alerts for High Urgency • If an email is marked High Urgency, it sends an alert to a designated Slack channel with all key details. 📊 Google Sheets Logging • All emails are logged to two Google Sheets: • Sheet1: All messages, for long-term record. • Sheet2: Temporary sheet to collect latest batch for digest. ⏳ Wait + Digest Preparation • After logging, the workflow waits 30 seconds. • It then fetches recent entries from Sheet2, filters out older messages, and groups them by Medium and Low urgency. 📬 Slack Digest Summary • A clean digest is posted on Slack showing only the Medium and Low urgency messages from the past hour — helping you catch up without inbox overload.
Uses a System Prompt to define its role as an AI Chief of Staff.
Uses a User Prompt that instructs GPT-4 to analyze each email and return a structured JSON with the following: • summary – One-line summary of the email • urgency – High / Medium / Low • category – Investor, Customer, Support, Spam, Other • Intent – One of: • To Respond: Needs your reply • Awaiting Reply: You’re waiting for a response • Notification: Auto-updates from tools or services • Meeting Update: Calendar or schedule changes • Marketing: Promotional or cold emails • FYI: Informational emails that don’t need action
The output is clean JSON with built-in guardrails to avoid hallucinations or irrelevant content. Only real message data is used for summaries and classification.
Sections with no relevant data are omitted to keep it concise.
🧩 What’s Next
This agent already cuts through inbox noise and gives you clarity — but there’s more you can build on top:
💡 Suggestions to Improve: • Train on your past threads to make prioritization even smarter • Allow custom rules per sender or domain (e.g. always mark investor emails as High) • Add emoji tags or reactions in Slack to quickly mark emails as done or follow-up • Support voice summary via Slack audio snippet or Loom integration
🚀 Next Features You Could Add: • Reply-from-Slack: One-click smart reply suggestions that can be sent right from Slack • Cross-inbox support: Add Outlook or multiple Gmail accounts • Weekend Digest: A weekly email or Slack drop with trends (top senders, most flagged categories) • Daily Timeline View: Generate a Notion page that logs the day’s most critical communication
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments