🎫 Ai-powered email triage & auto-response system with OpenAI agents & Gmail

921 views · 🎫 Ticket Management & Triage

Description

AI Email Dispatcher: Classify, Process, and Route Emails with Multiple Agents

This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, the agent will then:

This is the ultimate workflow for managing a high volume of emails, ensuring every message gets a fast, appropriate, and structured AI-powered response or initial analysis.

How it works

Set up steps

Setting up the accounts and nodes should take about 10–15 minutes.

  1. Gmail Account: You’ll need to set up two Gmail credentials for the workflow:
    • One for the Gmail Trigger to watch for new unread emails.
    • A second one for the Gmail action nodes to label, draft, and reply to messages.
  2. OpenAI Account: Connect your OpenAI API Key to the five different LLM Agent nodes.
  3. Telegram/Slack: Set up your Telegram or Slack credentials to receive the ‘New Sales Opportunity’ and ‘New Finance’ notifications.
  4. Labels in Gmail: Before activating the workflow, make sure you have created the necessary labels in your Gmail account for the classifier (Internal, Customer Support, Promotions, Admin/Finance, Sales Opportunity).
  5. Review Agent Prompts: The instructions and logic for each AI Agent are in the system messages. You might want to review and customize these prompts to match your specific business rules and tone.

Requirements

Customising this workflow

You can easily adapt this template to suit your needs!

🔗 Nodes Used

Google Sheets, HTTP Request, Telegram, Google Drive, Gmail, Google Drive Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup