Category: Automations › Gmail & Inbox Automation · Best for: Outlook and Microsoft 365 users · Platform: n8n · Steps: 20
What it does
The AI sorts and answers your Outlook emails for you.
These filters ensure we do not process flagged emails or email that already have a category set.
Works with: OpenAI, Output Parser Structured, Outlook, Airtable, Monday Com, Agent
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- Microsoft 365 (Outlook): how to connect (used by Microsoft Outlook23, Set Category, Set Importance)
- OpenAI API key: how to connect (used by OpenAI Chat Model)
- mondayComApi: how to connect (used by Monday.com - Get Contacts)
- Airtable personal access token: how to connect (used by Airtable - Contacts, Rules, Categories, Delete Rules, Contact)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Monday.com - Get Contacts →
boardId: choose your own - Airtable - Contacts →
base: choose your own - Airtable - Contacts →
table: choose your own - Rules →
base: choose your own - Rules →
table: choose your own - Categories →
base: choose your own - Categories →
table: choose your own - Delete Rules →
base: choose your own - Delete Rules →
table: choose your own - Contact →
base: choose your own - Contact →
table: choose your own
- Monday.com - Get Contacts →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). When clicking ‘Test workflow’ starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- When clicking ‘Test workflow’ starts the workflow (Manual).
- Check Mail Schedule Trigger starts the workflow (Schedule).
- Update Contacts Schedule Trigger starts the workflow (Schedule).
- OpenAI Chat Model uses AI (OpenAI).
- Structured Output Parser uses AI (Output Parser Structured).
- Microsoft Outlook23 uses Outlook to getAll.
- Rules uses Airtable to search.
- Categories uses Airtable to search.
- Delete Rules uses Airtable to search.
- Monday.com - Get Contacts uses Monday Com to boardItem getAll.
- AI: Analyse Email uses AI (Agent).
- Convert to Markdown uses Markdown.
- Merge uses Merge.
- Airtable - Contacts uses Airtable to upsert.
- Set Category uses Outlook to update.
- Email Messages reshapes the data for the next step.
- If checks a condition and routes items accordingly.
- Loop Over Items uses Split In Batches.
- Set Importance uses Outlook to update.
- Contact uses Airtable to search.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Microsoft Outlook AI Email Assistant
Outlook Business with filters
Filters:
flag/flagStatus eq 'notFlagged' and not categories/any()
These filters ensure we do not process flagged emails or email that already have a category set.
Sanitise Email
Removes HTML and useless information in preparation for the AI Agent
Get Rules & Categories
Edit the airtables to set your own categories, rules, contacts and/or delete rules.
CRM Contact List Integration
For this workflow I am retrieving supplier & client contacts from Monday.com the email assistant has better context to categorise, prioritise and reply to emails. The list is updated daily or you can change the scheduler trigger to update more or less frequently. You could replace this with your own CRM.
Categorise & Prioritise Emails Agent
Set the category & importance using the output from the agent
Match Contact
Check if the sender is an existing contact. Note in this workflow the contacts are dynamically loaded from Monday.com
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method