Gmail smart auto-responder with GPT-4o and Google Drive context memory
Needs changesWhat this workflow does
This AI workflow has 17 nodes and runs on Gmail events. Along the way it connects Gmail, Google Drive, Embeddings OpenAI and OpenAI Chat Model.
How it runs
Trigger: On Gmail events.
- Google Drive: download
- Gmail: get many
- Profile Document Loader (Default Data Loader): uses Default Data Loader
- Thread Document Loader (Default Data Loader): uses Default Data Loader
- Simple Vector Store: stores documents in the Simple vector store, with embeddings: OpenAI Embeddings; document loader: Thread Document Loader, Profile Document Loader
- Prepare Agent Context (Edit Fields (Set)): sets 1 field: text
- Email Reply Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Vector Store Retriever); memory: Simple Memory
- Check If Reply Needed (If): checks a condition and branches into true / false
- Gmail: work with draft
- Error Handler (Code): runs custom JavaScript code
Services it uses
Other OpenAI + Gmail templates (1,623) · Other OpenAI + Google Drive templates (628) · Other Gmail + Google Drive templates (465)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Email Reply Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- 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).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Email Reply Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Google Drive
n8n-nodes-base.googleDrive - Gmail
n8n-nodes-base.gmail - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory - Edit Fields (Set)
n8n-nodes-base.set - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Code
n8n-nodes-base.code
From the author
Advanced Gmail AI Auto-Responder with Context Intelligence The next-generation email automation that knows your communication style, remembers conversations, and responds with human-like intelligence. 🚀 What Makes This Advanced? Unlike basic AI email…