Skip to main content

Smart email triage with Gmail, GPT-4, Slack and Google Sheets

Workflow preview

Workflow preview
100%
Smart email triage with Gmail, GPT-4, Slack and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description This workflow intelligently analyzes incoming Gmail emails, classifies intent using GPT 4, and sends real time Slack notifications while logging structured data into Google Sheets. It p...

Best for

  • Ticket Management automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.slack, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatazureopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
Smart email triage with Gmail, GPT-4, Slack and Google Sheets
Workflow name
Smart email triage with Gmail, GPT-4, Slack and Google Sheets

Description

This workflow intelligently analyzes incoming Gmail emails, classifies intent using GPT-4, and sends real-time Slack notifications while logging structured data into Google Sheets. It provides a smart, AI-assisted communication workflow that saves time and ensures no important email is overlooked. πŸ€–πŸ’ŒπŸ“Š

What This Template Does

  • Monitors Gmail for unread or new incoming emails. πŸ“₯
  • Extracts sender, subject, and body content for processing. βœ‰οΈ
  • Uses GPT-4 to analyze email intent and determine priority. 🧠
  • Formats key insights (sender, summary, intent, urgency). 🧾
  • Posts structured summaries and priority alerts in Slack. πŸ’¬
  • Logs all processed emails with classification results in Google Sheets. πŸ“Š
  • Sends error notifications in case of API or parsing failures. 🚨

Key Benefits

βœ… AI-driven email intent classification for smarter response handling. βœ… Seamless Slack notifications for high-priority or urgent emails. βœ… Maintains a centralized record of email insights in Google Sheets. βœ… Reduces response time by surfacing critical messages instantly. βœ… Minimizes manual email triage and improves team productivity.

Features

  • Real-time Gmail monitoring for unread emails.
  • AI-based classification using GPT-4.
  • Slack notifications with rich formatting and urgency tagging.
  • Google Sheets logging for tracking and analytics.
  • Built-in error handling with notification alerts.
  • Modular setup for easy credential reuse across projects.

Requirements

  • Gmail OAuth2 credentials with inbox read access.
  • Slack Bot token with chat:write and channels:history scopes.
  • Google Sheets OAuth2 credentials for data logging.
  • Azure OpenAI (or OpenAI GPT-4) API credentials.
  • n8n instance (cloud or self-hosted).

Target Audience

  • Customer support teams managing shared inboxes.
  • Operations teams tracking email-based requests.
  • Sales or marketing teams prioritizing inbound leads.
  • AI automation enthusiasts optimizing email workflows.
  • Remote teams using Slack for real-time updates.

Step-by-Step Setup Instructions

  • Connect your Gmail, Slack, Google Sheets, and GPT-4 credentials in n8n. πŸ”‘
  • Specify the Gmail search filter (e.g., is:unread) for tracking new emails. πŸ“¬
  • Add your Slack channel ID in the notification node. πŸ’¬
  • Set your Google Sheet ID and tab name for logging results. πŸ“Š
  • Run once manually to verify connection and output structure. βœ…
  • Enable the workflow for continuous, real-time execution. πŸš€

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1

Block 2 - Extract Email Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Check Attachments

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 4 - Process Attachments

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Skip Attachments

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Parse AI Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Route Urgent

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 8 - Route Attachments

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 9 - Slack Urgent

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 10 - Slack Attachments

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 11 - Slack General

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 12 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 13 - Azure OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - lmChatAzureOpenAi
Config choices
Version 1

Block 14 - Simple Memory1

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 15 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 16 - Log to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 17 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 34 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Smart email triage with Gmail, GPT-4, Slack and Google Sheets
Complexity advanced
Nodes 34
Categories Ticket Management, AI Summarization
Author Rahul Joshi
Published 15 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9680/9680.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Smart email triage with Gmail, GPT-4, Slack and Google Sheets do?

Description This workflow intelligently analyzes incoming Gmail emails, classifies intent using GPT 4, and sends real time Slack notifications while logging structured data into Google Sheets. It p...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.