Automatic email categorization & labeling in Zoho Mail with GPT-4o-mini
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when a new email arrives over IMAP. Along the way it connects OpenRouter Chat Model. It also calls accounts.zoho.com over HTTP.
How it runs
Trigger: When a new email arrives over IMAP.
- Set Account ID (Edit Fields (Set)): sets 1 field: accountID
- Get Access token (HTTP Request): calls accounts.zoho.com (POST)
- Get labels (HTTP Request): calls an HTTP API
- Label name to ID map (Code): runs custom JavaScript code
- Text Classifier: classifies text into categories with AI, with model: OpenRouter Chat Model
- Set Support Category (Edit Fields (Set)): sets 1 field: Category
- Set Leads Category (Edit Fields (Set)): sets 1 field: Category
- Set Account Management Category (Edit Fields (Set)): sets 1 field: Category
- Set Billing & Finance Category (Edit Fields (Set)): sets 1 field: Category
- Set HR & Recruitment Category (Edit Fields (Set)): sets 1 field: Category
…plus 2 more steps. See the full node list below.
Services it uses
HTTP calls to: accounts.zoho.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Merge
n8n-nodes-base.merge - Email Trigger (IMAP)
n8n-nodes-base.emailReadImap - No Operation, do nothing
n8n-nodes-base.noOp - Code
n8n-nodes-base.code
From the author
📧 AI-Powered Email Categorization & Labeling in Zoho Mail This n8n template demonstrates how to use AI text classification to automatically categorize incoming emails in Zoho Mail and apply the correct label (e.g., Support, Billing, HR). It saves time by…