Skip to main content

AI-powered email support router with Gmail, ChatGPT-4o, and Slack

Workflow preview

Workflow preview
100%
AI-powered email support router with Gmail, ChatGPT-4o, and Slack preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n template automates your customer support workflow by connecting Gmail, OpenAI, Supabase, and Slack. It listens for new incoming emails, classifies them using AI, routes them to the appropr...

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.slack, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.supabase, n8n-nodes-base.if, n8n-nodes-base.switch, n8n-nodes-base.gmail, n8n-nodes-base.stickynote

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI-powered email support router with Gmail, ChatGPT-4o, and Slack
Workflow name
AI-powered email support router with Gmail, ChatGPT-4o, and Slack

This n8n template automates your customer support workflow by connecting Gmail, OpenAI, Supabase, and Slack. It listens for new incoming emails, classifies them using AI, routes them to the appropriate Slack channel based on category (e.g., support or new requests), logs each thread to Supabase for tracking, and marks the email as read once processed.

Good to know
•	The OpenAI API is used for automatic email classification, which incurs a small per-request cost. See OpenAI Pricing for up-to-date info.
•	You can easily expand the categories or connect more Slack channels to fit your workflow.
•	The Supabase integration ensures you don’t process the same thread twice.

How it works

1.	Gmail Trigger checks for unread emails.
2.	Supabase Get Row verifies if the thread already exists.
3.	If it’s a new thread, the OpenAI node classifies the email into categories such as “support” or “new-request.”
4.	The Switch node routes messages to the correct Slack channel based on classification.
5.	Supabase Create Row logs thread details (sender, subject, IDs) to your database.
6.	Finally, the Gmail node marks the message as read to prevent duplication.

How to use

•	The workflow uses a manual Gmail trigger by default, but you can adjust the polling frequency.
•	Modify category names or Slack channels to match your internal setup.
•	Extend the workflow to include auto-replies or ticket creation in your CRM.

Requirements

•	Gmail account (with OAuth2 credentials)
•	Slack workspace (with channel access)
•	OpenAI account for classification
•	Supabase project for storing thread data

Customizing this workflow

Use this automation to triage incoming requests, route sales leads to specific teams, or even filter internal communications. You can add nodes for auto-responses, CRM logging, or task creation in Notion or ClickUp.

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.3

Block 2 - Send a message

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

Block 3 - Message a model

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 4 - Create a row

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

Block 5 - Get a row

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

Block 6 - If

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

Block 7 - Switch

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 8 - Mark a message as read

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 9 - Sticky Note

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

Block 10 - Sticky Note1

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

Block 11 - Sticky Note2

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

Block 12 - Sticky Note3

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

Block 13 - Sticky Note4

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

Block 14 - Send a message 2

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

Block 15 - Sticky Note5

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

Block 16 - Sticky Note6

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

Block 17 - Sticky Note7

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

Block 18 - Sticky Note8

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

3. Summary Table

Workflow AI-powered email support router with Gmail, ChatGPT-4o, and Slack
Complexity advanced
Nodes 18
Categories Ticket Management, AI Summarization
Author Bohdan Saranchuk
Published 08 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9376/9376.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 AI-powered email support router with Gmail, ChatGPT-4o, and Slack do?

This n8n template automates your customer support workflow by connecting Gmail, OpenAI, Supabase, and Slack. It listens for new incoming emails, classifies them using AI, routes them to the appropr...

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.