Block 1 - Support Answer Found
- Type / Role
- n8n-nodes-base.if - if
- Config choices
- Version 2.2
This workflow is provided as-is. Please review and test before using in production.
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 k...
n8n-nodes-base.if, @n8n/n8n-nodes-langchain.textclassifier, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.gmailtrigger, n8n-nodes-base.gmail, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.
Original n8n.io sourceThis 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 new or complex questions arise, continuously expanding its capabilities.
Think of it like having an AI assistant with a smart memory and a human mentor. Here's the step-by-step process:
Google Gemini 2.5 Flash Lite) first classifies the incoming email to ensure it's a genuine support request, filtering out irrelevant messages.Google Gemini 2.5 Pro) analyzes the customer's email against the entire knowledge base. It attempts to find a highly relevant answer and drafts a complete HTML email response if successful.IF node checks if the AI found a confident answer.Google Gemini 2.5 Flash) processes both the original customer question and the expert's reply to distill them into a new, generic, and reusable Question/Answer pair.Setup time: ~10-15 minutes
This workflow requires connecting your Gmail and Google Sheets accounts, and obtaining a Google AI API key. Follow these steps carefully:
Connect Your Gmail Account:
On New Email Received node.+ Create New Credential to connect your Gmail account. Grant the necessary permissions.Send AI Answer and Ask Human for Help nodes, selecting the credential you just created.Connect Your Google Sheets Account:
Get Knowledge Base node.+ Create New Credential to connect your Google account. Grant the necessary permissions.Add to Knowledge Base node, selecting the credential you just created.Set up Your Google Sheet Knowledge Base:
QA Database.QA Database, add two column headers: Question (in cell A1) and Answer (in cell B1).Get Knowledge Base node in n8n. In the Document ID field, select your newly created Google Sheet. Do the same for the Add to Knowledge Base node.Get Your Google AI API Key (for Gemini Models):
Google Gemini 2.5 Pro node, click the Credential dropdown, and select + Create New Credential.Google Gemini 2.5 Flash Lite and Google Gemini 2.5 Flash nodes, selecting the credential you just created.Configure Human Expert Email:
Ask Human for Help node.Activate the Workflow:
Start Learning!
Send a test email to the Gmail account connected to the On New Email Received node. Observe how the AI responds, or how it escalates to your expert email and then learns from the reply. Check your Google Sheet to see new Q&A pairs being added!
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.
| Workflow | 🤖 Self Improving Email AI Support with Human-in-the-Loop |
|---|---|
| Complexity | advanced |
| Nodes | 27 |
| Categories | Support Chatbot, AI Chatbot |
| Author | Lucas Peyrin |
| Published | 20 Sept 2025 |
Use the JSON export at /data/workflows/8779/8779.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
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 k...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.