Auto-categorize Outlook emails into color categories with GPT-4o
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER 🎉 Early Black Friday Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
This workflow fetches recent emails from Outlook and uses OpenAI to assign a category (e.g., Red, Yellow, Green). It then updates each message’s category in Outlook.
⚙️ Setup Instructions
1️⃣ Set Up Outlook Connection
- In n8n → Credentials → New → Microsoft Outlook OAuth2 API
- Log in with your Outlook account & approve access
- Attach this credential to the Get Messages from Outlook and Update Category nodes in the workflow
- (Optional) Adjust the limit field in Get Messages from Outlook if you want more/less than 5 results
2️⃣ Set Up OpenAI Connection
- Go to the OpenAI Platform
- Navigate to OpenAI Billing
- Add funds to your billing account
- Copy your API key into the OpenAI credentials in n8n and select it on the OpenAI Chat Model and Categorizing Agent nodes
✅ Notes
- The agent reads
subject+bodyPreviewand returns a JSON category. - The Update Category node writes that category back to Outlook.
- You can tweak the category names or logic in the Categorizing Agent system message.
📬 Contact
Need help customizing the categorization rules or routing categories to folders?