Microsoft Outlook AI Email Assistant with Contact Support from Monday and Airtable - n8n Workflow | Neura Market
Microsoft Outlook AI Email Assistant with Contact Support from Monday and Airtable
# Microsoft Outlook AI Email Assistant
## **Prerequisites**
### **1. Microsoft 365 Login Credentials**
- Provide your Office 365 credentials to connect to Outlook.
### **2. Monday.com**
- Generate an API token and have a board with your contact details.
### **3. Airtable**
- Obtain an API key (or personal access token) and set up a base to store:
- **Contacts** (populated by the Monday.com sync).
- **Rules & Categories** (used by the AI Email Assistant).
- Use this Airtable base as the template: [Airtable AI Email Assistant Template](https://airtable.com/appuffxqy5HlNYAXJ/shrhb292ZMF8FezS/tblP9SIola8yglSc0/viwxAIMM6vWoahfM?blocks=hide). Define your own rules, categories, and delete rules.
### **4. OpenAI API Key**
- Sign up for OpenAI if you don't already have an account.
- Generate a new API key at [OpenAI API Keys](https://platform.openai.com/api-keys).
---
## **What the System Does**
### **1. Daily Contact Sync (Monday.com → Airtable)**
- Runs **once a day** to pull the latest contacts from Monday.com and store or update them in Airtable.
### **2. AI Email Categorisation & Prioritisation**
- Fetches **Outlook emails** with filters.
- Cleans and processes email content.
- Matches emails with known contacts from Airtable.
- Uses an **AI agent** to classify, categorize, and prioritize emails.
- Updates **Outlook categories and importance** based on AI results.
- Runs in parallel with **Airtable rules & categories retrieval** for real-time decision-making.
---
# **Workflow 1: Daily Contact Sync (Monday.com → Airtable)**
### **Purpose**
Keep Airtable's **Contacts** table up to date by pulling new or updated contact data from Monday.com **daily**.
### **Steps**
1. **Schedule Trigger** - Runs at a set interval (daily) to initiate contact syncing.
2. **Monday.com: Get Contacts** - Reads the specified **board/columns** from Monday.com where you store contact details.
3. **Airtable - Contacts** - **Upserts** (adds or updates) the fetched Monday.com data into Airtable's **Contacts** table. - Ensures **daily updates** reflect changes from Monday.com.
### **Result**
A **consolidated contact list** in Airtable, ready for AI email categorization.
---
# **Workflow 2: Categorize & Prioritize Outlook Emails**
### **Purpose**
Fetches **Outlook emails**, cleans and processes their content, **matches senders** with known contacts, and uses AI to categorize and prioritize them.
### **Steps**
#### **1. Get Outlook Emails with Filters**
- **Trigger**: Either scheduled (`Check Mail Schedule Trigger`) or manual (`Test Workflow`).
- **Outlook Filters**: - **Not flagged** (`flag/flagStatus == notFlagged`). - **Not categorized** (`not categories/any()`).
**→ Result**: A batch of **fresh, unprocessed emails** ready for processing.
---
#### **2. Sanitize Email**
- **Convert to Markdown**: Strips **HTML tags** and normalizes formatting.
- **Email Messages Processing**: Allows manual removal of **signatures, disclaimers, or extra content**.
**→ Result**: A **clean, AI-friendly email** for categorization.
---
#### **3. Match Contact**
- **Loop Over Emails**: Iterates over each email.
- **Contact Lookup**: Checks Airtable's **Contacts** table (updated daily).
- **Merge Data**: Enriches emails with known **client, supplier, or internal team** info.
**→ Result**: Enhanced email context **for AI processing**.
---
#### **4. AI Agent to Categorize & Prioritize**
- **Retrieve Rules & Categories** - Reads **Rules, Categories, and Delete Rules** from Airtable in parallel.
- **AI: Analyze Email (Tools Agent)** - Uses **email text, sender info, and rules** to build a **structured AI prompt**.
- **OpenAI Chat Model** - Processes the AI prompt and outputs: - **Category** - **Subcategory (optional)** - **Priority level** - **Short rationale**
- **Structured Output Parser** - Ensures AI response is in valid **JSON format**.
**→ Result**: Each email is **labeled, categorized, and prioritized** with AI-driven logic.
---
#### **5. Set Outlook Category & Importance**
- **Set Category**: Updates Outlook with the assigned **category**.
- **Check Priority Conditions** (`If` Node): - If **Action Required** or from a VIP, mark as **High Priority**.
- **Set Importance**: Updates the email's **importance flag** in Outlook.
**→ Result**: Outlook is updated with **categories & importance** based on AI recommendations.
---
## **Parallel Processing: Retrieve Rules & Categories**
- Runs **alongside** the email categorization workflow.
- Ensures **Airtable-based rules** are available before AI processing.
### **Steps**
1. **Airtable: Get Rules & Categories** - Fetches **Rules, Categories, and Delete Rules** from Airtable.
2. **Delete Rules (Optional)** - If a delete rule matches, the email is removed.
**→ Result**: A dynamic, **updatable rule system** ensuring emails are handled properly.
---
## **Final Outcome**
- **Daily Contact Sync** keeps the contact list consolidated and up to date for AI email categorization.
Platform
n8n
Category
AI
Price
Free
Creator
Cognitive Creators
if
set
merge
airtable
markdown
mondayCom
stickyNote
manualTrigger
splitInBatches
agent
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.