Auto-Categorize Outlook Emails into Color Categories with GPT-4o

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 + bodyPreview and 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?

📧 robert@ynteractive.com
🔗 Robert Breen
🌐 ynteractive.com

0
Downloads
1
Views
8.03
Quality Score
beginner
Complexity
Author:Robert Breen(View Original →)
Created:9/10/2025
Updated:11/17/2025

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments