Smart email manager with Gmail, GPT-4 classification & auto-responses
Needs changesWhat this workflow does
This AI workflow has 26 nodes and runs on Gmail events. Along the way it connects Gmail, Google Drive, Telegram and OpenAI Chat Model.
How it runs
Trigger: On Gmail events.
- Process One by One (Loop Over Items (Split in Batches)): loops over the items in batches
- Get Conversation Thread (Gmail): get (thread)
- Get Latest Message ID (Limit): keeps the first few items
- Get Latest Message Content (Gmail): get
- Get All Gmail Labels (Gmail): work with label
- Filter User Labels (If): checks a condition and branches into true / false
- Get User Labels (Aggregate): combines items into one
- AI Email Classifier (Basic LLM Chain): sends a prompt to an LLM, with model: AI Language Model; output parser: Auto-fixing Output Parser
- Smart Action Router (Switch): routes items into 4 branches
- AI Response Generator (Basic LLM Chain): sends a prompt to an LLM, with model: AI Language Model
…plus 12 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in Get Specific File Types, Get All Attachments: replace with Code node, mode 'Run Once for All Items'.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Get Specific File Types, Get All Attachments | Code node, mode 'Run Once for All Items' |
Nodes used (15)
- Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Limit
n8n-nodes-base.limit - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Switch
n8n-nodes-base.switch - Aggregate
n8n-nodes-base.aggregate - Google Drive
n8n-nodes-base.googleDrive - Telegram
n8n-nodes-base.telegram - Merge
n8n-nodes-base.merge - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Function
n8n-nodes-base.function
From the author
AI Email Assistant - Smart Email Processing & Response 🤖 A sophisticated n8n workflow that transforms your email management with AI-powered classification, automatic responses, and intelligent organization. 🎯 What This Workflow Does This advanced AI email…