This workflow automatically analyzes incoming emails using AI, categorizes them, routes them to the appropriate department, logs the results in Excel 365, and sends notifications to the responsible team member via Telegram.
It helps teams automate email triage, prioritize issues, and ensure that important messages are routed to the correct department without manual sorting.
This workflow is designed to be scalable, easy to configure, and adaptable for multiple business use cases such as support management, internal operations, finance monitoring, and technical issue tracking.
Import the workflow JSON file into your n8n instance.
Connect your email account using one of the following: - IMAP - Gmail -
Outlook
Set the trigger to detect new incoming emails.
Add your OpenAI API credentials in n8n.
The AI model is used to analyze incoming email content and generate
structured data such as summary, category, department, and priority.
Create an Excel file with two sheets.
File example: Email_Automation.xlsx
Timestamp Sender Subject Category Priority Department Action Attachment Spam Summary
Required
This sheet stores the processed email records for auditing and tracking.
Department PIC_Name Email Telegram_Chat_ID
Support Andi andi@company.com 12345678
Sales Rina rina@company.com 23456789
Finance Budi budi@company.com 34567890
Technical Dodi dodi@company.com 45678901
Management CEO ceo@company.com 56789012
General Admin admin@company.com 67890123
This sheet maps departments to the responsible team member and their
Telegram chat ID.
Create a Telegram Bot and connect it to n8n.
Ensure the Telegram Chat IDs in the Excel routing sheet are correct so
notifications are delivered to the right person.
Connect your Excel 365 account to n8n and select the Excel file used for
logging and department routing.
Send a test email to your monitored inbox.
The workflow should: 1. Analyze the email using AI 2. Determine category
and department 3. Log the result in Excel 4. Send a Telegram
notification to the responsible department
Example AI output:
{
"summary": "Customer asking about invoice payment status",
"category": "Invoice",
"priority": "Medium",
"department": "Finance",
"has_attachment": true,
"action_required": true,
"spam": false
}
Example Telegram notification:
📩 New Email Routed
Department: Finance
Priority: Medium
From: client@example.com
Subject: Invoice payment status
Summary:
Customer asking about invoice payment status
Action Required: Yes
Attachment: Yes
You can extend this workflow by adding: - Jira ticket creation for
technical issues - Slack or Microsoft Teams notifications - CRM
integration for sales leads - sentiment analysis for customer emails -
automated support ticket creation - SLA monitoring and escalation
This workflow demonstrates how AI can automate email intake,
classification, and operational routing for teams.
It can be adapted for customer support, internal operations, finance
monitoring, and technical issue tracking.