Skip to main content

📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB

Workflow preview

Workflow preview
100%
📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Categorise and route emails with GPT 5 This workflow demonstrates how to use AI text classifier to classify incoming emails, and uses a multi agent architecture to respond for each email category r...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.noop, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.stickynote, n8n-nodes-base.gmailtool, @n8n/n8n-nodes-langchain.vectorstorepinecone

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB
Workflow name
📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB

Categorise and route emails with GPT 5

This workflow demonstrates how to use AI text classifier to classify incoming emails, and uses a multi-agent architecture to respond for each email category respectively.

Use cases

Business owners with a lot of incoming emails, or anyone who has huge influx of emails

How it Works

Any incoming emails will be read by the text classifier powered by GPT 5, and routed according to the defined categories where respective agents will take next steps.

  1. Workflow is triggered when an email comes in
  2. GPT will read email's "subject","from" and "content" to route it accurately to respective designated categories
  3. For customer support enquiries, customer support agent will take knowledge from the pinecone vector database about FAQs and policies, reply via gmail, and label the email as "Customer Support"
  4. For finance-related queries, finance agent will label email as "Finance" and assess if email is about making payment or receiving from customers. If payment-related, email will be sent to the payments team to take action. If receipts-related, email will be sent to the receivables team to take action. User will be notified via telegram after any email is sent.
  5. For sales/leads enquiries, leads agent will label the email as "Sales Opportunities", take knowledge from the pinecone vector database about the business to generate a response and draft into gmail and user will be notified via telegram to review and send. If there is lack of information for agent to generate a response, user will be notified of this via telegram as well.
  6. Any internal team member emails will be routed to the internal agent. The agent will label message as "Internal" and send user a summary of the email message via telegram.

How to set up

  • Set up Telegram bot via Botfather. See setup instructions here
  • Setup OpenAI API for transcription services (Credits required) here
  • Set up Openrouter account. See details here
  • Set up Pinecone database. See details here

Customization Options

Other than Gmail, it is possible to connect to Outlook as well. Other than Pinecone vector database, there are other vector database that should serve the same purpose eg. supabase, qdrant, weviate

Requirements

  • Gmail account
  • Telegram bot
  • Pinecone account
  • Open router account

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 - No Operation, do nothing

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

Block 3 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 4 - Reply Email

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

Block 5 - Customer Support Agent

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

Block 6 - Finance Agent

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

Block 7 - Leads Agent

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

Block 8 - Sticky Note

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

Block 9 - Internal Agent

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

Block 10 - Label as Customer Support

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

Block 11 - Label as Finance

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

Block 12 - Label as Sales Opportunities

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

Block 16 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 17 - Database of FAQs and Policies

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

Block 18 - Needs Review?

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

Block 19 - GPT 4o mini

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

Block 20 - GPT 4o mini1

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

Block 21 - GPT 4o mini2

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

Block 22 - GPT 4o mini3

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

Block 23 - Inbox Router

Type / Role
@n8n/n8n-nodes-langchain.textClassifier - textClassifier
Config choices
Version 1.1

Block 24 - Route by Email Type

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

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

3. Summary Table

Workflow 📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB
Complexity advanced
Nodes 41
Categories Ticket Management, AI Chatbot
Author Zawanah
Published 12 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8490/8490.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 📩 Automated email management system with GPT-5, multi-agent AI & Pinecone DB do?

Categorise and route emails with GPT 5 This workflow demonstrates how to use AI text classifier to classify incoming emails, and uses a multi agent architecture to respond for each email category r...

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 Chatbot use case.