🤖 Self Improving Email AI Support with Human-in-the-Loop
Ready for 3.0Ready 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 16 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets and Google Gemini Chat Model.
How it runs
Trigger: On Gmail events.
- Is it a Support Request? (Text Classifier): classifies text into categories with AI, with model: Gemini Flash Lite Latest
- Get Knowledge Base (Google Sheets): uses Google Sheets
- Combine into Knowledge Context (Aggregate): combines items into one
- Find Answer with AI (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Flash Latest
- Parsed AI Response (Edit Fields (Set)): sets or maps fields
- Support Answer Found (If): checks a condition and branches into true / false
- Send AI Answer (Gmail): uses Gmail
- Ask Human for Help (Gmail): send and wait for a reply
- AI: Create Reusable Q&A (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini Flash Latest (1); output parser: Structured Output Parser
- Add to Knowledge Base (Google Sheets): append
Services it uses
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) (On New Email Received).
Nodes used (11)
- If
n8n-nodes-base.if - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - Aggregate
n8n-nodes-base.aggregate - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - No Operation, do nothing
n8n-nodes-base.noOp
From the author
How it works This workflow creates a sophisticated, self-improving customer support system that automatically handles incoming emails. It's designed to answer common questions using an AI-powered knowledge base and, crucially, to learn from human experts when…