Smart email assistant: automate customer support with AI & Supabase
Needs changesWhat this workflow does
This AI workflow has 20 nodes and runs on Gmail events (plus 2 other triggers). Along the way it connects Gmail, OpenAI, OpenAI Chat Model and Vector Store Question Answer and 4 more.
How it runs
Trigger: On Gmail events (plus 2 other triggers).
- AI Email Classifier (OpenAI): uses OpenAI
- Set File ID (Edit Fields (Set)): sets or maps fields
- Route Email (Switch): routes items into branches
- Delete Old Doc Rows (Supabase): uses Supabase
- AI Response Generator (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (Create Draft, Vector Store Tool)
- Download File (Google Drive): uses Google Drive
- Extract Document Text (Extract from File): extracts data from a file
- Insert into Supabase Vectorstore (Supabase Vector Store): uses the Supabase vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
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 AI Response Generator (v1.7): 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) AI Response Generator (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (16)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - Switch
n8n-nodes-base.switch - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Vector Store Question Answer Tool
@n8n/n8n-nodes-langchain.toolVectorStore - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Google Drive
n8n-nodes-base.googleDrive - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Extract from File
n8n-nodes-base.extractFromFile - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - Gmail Tool
n8n-nodes-base.gmailTool
From the author
Intelligent Email Support System with Vector Database Overview This n8n workflow automates email support using AI and vector database technology to provide smart, context-aware responses. It seamlessly integrates email automation and document management,…