Unified Email Intelligence Hub
Automate your inbox with AI-powered classification, prioritization, and draft reply generation.
Workflow Setup Guide
Overview
This workflow connects your Gmail and Outlook accounts to automatically process, analyze, and organize every incoming email. Using AI, it classifies emails by type and urgency, generates professional draft replies, applies labels, and alerts you via Slack when attention is needed — all without ever sending anything automatically.
Core philosophy: Human oversight at every step. All AI-generated replies become drafts for you to review before sending.
What This Workflow Does
| Step | Action |
|---|---|
| 1. Fetch | Retrieves up to 20 unread emails from Gmail and 20 from Outlook per run |
| 2. Normalize | Combines both sources into a unified email format |
| 3. Analyze | AI classifies each email (urgent / important / reply_needed / personal / newsletter / automated / spam) and assigns priority (1–10) |
| 4. Summarize | Generates a 2–3 sentence AI summary of each email's content |
| 5. Draft | Creates draft replies in Gmail or Outlook for emails marked as reply_needed |
| 6. Label | Applies Gmail labels (IMPORTANT, STARRED, CATEGORY_PROMOTIONS, etc.) |
| 7. Alert | Posts to Slack when priority ≥ 7 or marked urgent |
| 8. Log | Records every processed email to Google Sheets |
| 9. Visualize | Displays real-time analytics on an interactive dashboard |
Features
Intelligent Classification
- 7 categories: urgent, important, reply_needed, personal, newsletter, automated, spam
- Priority scoring: 1–10 scale based on content urgency
- AI summaries: Every email gets a concise 2–3 sentence summary
Draft-Only Mode (Safety First)
- Replies are saved as drafts only — never auto-sent
- Review every AI-generated response before sending
- Full audit trail via Google Sheets
Smart Notifications
- Slack alerts for high-priority emails (priority ≥ 7)
- Configurable threshold
Interactive Dashboard
- Real-time stats: total processed, urgent count, drafts created, average priority
- Email source breakdown (Gmail vs Outlook)
- Classification analytics
- Searchable email list with filters
- Draft preview system
- Integration status visibility
Google Sheets Logging
Each processed email is logged with:
- email_id, timestamp, source
- sender details, subject, date
- classification, priority
- summary, actions, suggested_reply
- labels
Integrations
| Service | Operations Used |
|---|---|
| Gmail | Read inbox, create drafts, apply labels |
| Outlook | Read inbox, create drafts |
| Google Sheets | Create spreadsheet, append rows, read data |
| Slack | Post messages to channel |
| OpenRouter | GPT-4o Mini for AI analysis |
Setup Requirements
- Connect Gmail (OAuth)
- Connect Outlook (OAuth)
- Connect Slack (for alerts)
- Connect Google Sheets (for logging)
The workflow includes a setup wizard to guide all integrations.
Output Data Structure
{
"email_id": "abc123",
"source": "gmail",
"from": "John Doe",
"from_email": "john@example.com",
"subject": "Meeting request",
"date": "2026-04-27T10:00:00Z",
"summary": "John is requesting a meeting to discuss the Q2 roadmap...",
"classification": "important",
"priority": 7,
"actions": ["reply", "label"],
"suggested_reply": "Hi John, I'd be happy to meet to discuss...",
"labels": ["IMPORTANT"],
"should_draft": true,
"should_label": true,
"should_notify": true,
"processed_at": "2026-04-27T10:05:00Z"
}Use Cases
- Inbox Zero: Automatically process and categorize emails
- High-priority alerts: Never miss urgent emails
- Response drafting: AI-generated replies ready for review
- Multi-account management: Unified Gmail + Outlook view
- Email analytics: Track trends, priorities, and volume
Safety Guarantees
| Guarantee | Description |
|---|---|
| Zero Auto-Send | Every reply is a draft |
| Full Transparency | All actions are logged and visible |
| Human-in-the-Loop | Review → Edit → Send |
Technical Notes
- Processing mode: Sequential (one email at a time)
- Batch size: Up to 20 unread emails per service per run
- AI model: GPT-4o Mini via OpenRouter
- Trigger: Manual or scheduled (cron)
- Dashboard refresh: Every 25 seconds
About This Template
This workflow template contains 36 nodes that you can customize for your needs. Fork it to your account to start editing and running the workflow.