Zero manual mapping. The workflow automatically discovers your Outlook folders, understands the context, assigns the correct category, and moves the email into the right folder. It uses the original Microsoft Outlook nodes plus an AI Agent. You can connect OpenAI or any other LLM provider.
Action
+ Project
).Connect Outlook
In n8n → Credentials → Microsoft Outlook , grant at least Mail.ReadWrite
.
Connect AI
In n8n → Credentials , set up OpenAI (or another model). Works best with GPT-4.x or GPT-4o.
Import the Workflow
n8n → Workflows → Import from File/Clipboard and paste the provided JSON.
Enable Trigger
Adjust the Schedule Trigger (e.g., every 5 minutes).
Run & Verify
Test run and watch emails get categorized and moved automatically.
You are an advanced AI email categorization system. Your mission is to intelligently analyze and categorize emails with maximum accuracy and context awareness.
INTELLIGENT CATEGORIZATION ENGINE:
- Parse all available categories: {{ $json.category }}
- Multi-layer analysis: Sender, Subject, Body, Links, Attachments
- Prioritize: Security threats, Action Required, Business Context
- Specialized: SaaS, Hosting, E-commerce, Finance, Support, Corporate
- Anti-Spam: Pattern detection, spoofing, red-flag subjects
- Dual Logic: Primary + Secondary categories when applicable
OUTPUT FORMAT (JSON only):
{
"subject": "EXACT_EMAIL_SUBJECT",
"category": "PRIMARY_CATEGORY_FROM_AVAILABLE_LIST",
"subCategory": "SECONDARY_CATEGORY_IF_APPLICABLE",
"analysis": "Reasoning",
"confidence": "HIGH/MEDIUM/LOW"
}
Available Categories: {{ $json.category }}
Mail.ReadWrite
permissions.n8n
, Outlook
, Email
, AI
, Automation
, Categorization
Connect → Import → Run.
No manual mapping. AI-powered categorization that labels and organizes your Outlook mailbox automatically.