Automatic email categorization and organization with Outlook and GPT-4o
Needs changesWhat this workflow does
This AI workflow has 22 nodes and runs on a schedule (every minute). Along the way it connects Microsoft Outlook and OpenRouter Chat Model.
How it runs
Trigger: On a schedule (every minute).
- RecievedEmail (Microsoft Outlook): get many
- Filter: keeps only the items that match a condition
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Markdown: converts between Markdown and HTML
- varEmal (Edit Fields (Set)): sets 5 fields: subject, importance, sender…
- Get many folders (Microsoft Outlook): get many (folder)
- Summarize: summarizes / groups the items
- Code: runs custom JavaScript code
- VarID Category (Edit Fields (Set)): sets 2 fields: id, category
- AI Agent: runs an AI agent, with model: OpenRouter Chat Model
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent1 (v1.6), AI Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent1 (v1.6), AI Agent (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Markdown
n8n-nodes-base.markdown - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Microsoft Outlook
n8n-nodes-base.microsoftOutlook - Summarize
n8n-nodes-base.summarize - Schedule Trigger
n8n-nodes-base.scheduleTrigger - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter
From the author
n8n – Outlook AI Categorization & Labeling (Fully Automated) > 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…