Route Gmail support emails with Google Gemini, OpenAI and Supabase
Ready for 3.0What this workflow does
This AI workflow has 29 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Google Drive, Supabase Vector Store, Embeddings OpenAI and Gmail and 2 more.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Download Knowledge File (Google Drive): download
- Prepare Email Data (Edit Fields (Set)): sets 5 fields: email_id, thread_id, sender…
- Parse Human Final Reply (Code): runs custom JavaScript code
- Insert Knowledge into Supabase (Supabase Vector Store): stores documents in the Supabase vector store, with embeddings: OpenAI Embeddings for Ingestion; document loader: Default Data Loader
- Support AI Agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 1 tool (agency_knowledge); output parser: Support Decision Schema
- Send Human Final Reply to Customer (Gmail): reply
- Route Support Decision (Switch): routes items into 3 branches
- Remove Needs-Human Label (Gmail): remove labels
- Send Grounded Reply (Gmail): reply
- Label Needs-Human (Gmail): add labels
…plus 10 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (14)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Drive
n8n-nodes-base.googleDrive - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code
From the author
Quick overview Automate Gmail customer support using an approved knowledge base, Google Gemini and Supabase. Send routine replies, route sensitive requests to a human reviewer, label unrelated messages, and log outcomes in Google Sheets. A separate branch…