Templates / Smart email assistant: automate customer support with AI & Supabase

Smart email assistant: automate customer support with AI & Supabase

Needs changes

by Badr ✓ · 6,102 views · created 2025-02-18 · Ticket Management, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

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

  1. AI Email Classifier (OpenAI): uses OpenAI
  2. Set File ID (Edit Fields (Set)): sets or maps fields
  3. Route Email (Switch): routes items into branches
  4. Delete Old Doc Rows (Supabase): uses Supabase
  5. AI Response Generator (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (Create Draft, Vector Store Tool)
  6. Download File (Google Drive): uses Google Drive
  7. Extract Document Text (Extract from File): extracts data from a file
  8. Insert into Supabase Vectorstore (Supabase Vector Store): uses the Supabase vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader

Services it uses

GmailOpenAIOpenAI Chat ModelVector Store Question AnswerEmbeddings OpenAISupabase Vector StoreGoogle DriveSupabase

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

Removed in 3.0Replace 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)

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,…

Excerpt from Badr'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.