Templates / Route Gmail support emails with Google Gemini, OpenAI and Supabase

Route Gmail support emails with Google Gemini, OpenAI and Supabase

Ready for 3.0

by Ebad Ullah · 0 views · created 2026-11-06 · Support Chatbot, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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).

  1. Download Knowledge File (Google Drive): download
  2. Prepare Email Data (Edit Fields (Set)): sets 5 fields: email_id, thread_id, sender…
  3. Parse Human Final Reply (Code): runs custom JavaScript code
  4. 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
  5. Support AI Agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 1 tool (agency_knowledge); output parser: Support Decision Schema
  6. Send Human Final Reply to Customer (Gmail): reply
  7. Route Support Decision (Switch): routes items into 3 branches
  8. Remove Needs-Human Label (Gmail): remove labels
  9. Send Grounded Reply (Gmail): reply
  10. Label Needs-Human (Gmail): add labels

…plus 10 more steps. See the full node list below.

Services it uses

Google DriveSupabase Vector StoreEmbeddings OpenAIGmailGoogle SheetsGoogle Gemini Chat Model

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)

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…

Excerpt from Ebad Ullah's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.