Templates / Analyze, classify, and summarize Gmail with OpenAI RAG and Google Sheets

Analyze, classify, and summarize Gmail with OpenAI RAG and Google Sheets

Ready for 3.0

by Amirhosein Zahedi · 152 views · created 2026-02-21 · Ticket Management, 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-10-19.

What this workflow does

This AI workflow has 20 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Gmail, Google Sheets and Telegram and 2 more.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Fetch full Gmail message (Gmail): get
  2. Get row(s) in sheet (Google Sheets): uses Google Sheets
  3. Normalize email fields (Edit Fields (Set)): sets 6 fields: id, date, sender…
  4. Vector store — taxonomy index (Simple Vector Store): stores documents in the Simple vector store, with embeddings: Create embeddings (OpenAI); document loader: Prepare taxonomy documents
  5. Analyze email with RAG agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Vector store retriever (RAG tool))
  6. Parse AI analysis result (Edit Fields (Set)): sets 12 fields: sender, email, date…
  7. Store processed email (Google Sheets): append
  8. Check for new taxonomy items (If): checks a condition and branches into true / false
  9. Load taxonomy dataset (Google Sheets): uses Google Sheets
  10. Generate audio summary (OpenAI): work with audio

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

Services it uses

OpenAI Chat ModelGmailGoogle SheetsTelegramOpenAIEmbeddings OpenAI

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.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).

Nodes used (14)

From the author

<h2📧 Analyze, classify, and summarize emails using RAG (automatic taxonomy learning)</h2 <p This workflow automatically reads incoming Gmail messages, analyzes them using AI with a retrieval-augmented classification system (RAG), organizes emails into…

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