🤖 Self Improving Email AI Support with Human-in-the-Loop
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, c...
Template notes
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 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:
1. New Email Received: The workflow is triggered whenever a new email arrives in your designated support inbox (via Gmail). 2. Classify Request: An AI model (Google Gemini 2.5 Flash Lite) first classifies the incoming email to ensure it's a genuine support request, filtering out irrelevant messages. 3. Retrieve Knowledge Base: The workflow fetches all existing Question and Answer pairs from your dedicated Google Sheet knowledge base. 4. AI Answer Attempt: A powerful AI model (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. 5. Decision Point: An IF node checks if the AI found a confident answer. If Answer Found: The AI-generated HTML response is immediately sent back to the customer via Gmail. If No Answer Found (Human-in-the-Loop): Escalate to Human: The customer's summarized question and original email are forwarded to a human expert (you or your team) via Gmail, requesting their assistance. Human Reply & AI Learning: The workflow waits for the human expert's reply. Once received, another AI model (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. Update Knowledge Base: This newly created Q&A pair is then automatically added as a new row to your Google Sheet knowledge base, ensuring the system can answer similar questions automatically in the future.
Set up steps
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:
1. Connect Your Gmail Account: Select the On New Email Received node. Click the Credential dropdown and select + Create New Credential to connect your Gmail account. Grant the necessary permissions. Repeat this for the Send AI Answer and Ask Human for Help nodes, selecting the credential you just created.