AutomationMart
Home/Browse/🤖 Self Improving Email AI Support with Human-in-the-Loop
n8n

🤖 Self Improving Email AI Support with Human-in-the-Loop

n8nn8n16 modulesv1.0
GmailGoogle SheetsGoogle DriveGemini

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 whene

At a glance

🤖 Self Improving Email AI Support with Human-in-the-Loop is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, Google Sheets, Google Drive, Gemini. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Gmail, Google Sheets, Google Drive, Gemini
Modules
16
Price
Free
Version
v1.0
🤖 Self Improving Email AI Support with Human-in-the-Loop workflow diagram

About this workflow

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. 2. Connect Your Google Sheets Account: Select the Get Knowledge Base node. Click the Credential dropdown and select + Create New Credential to connect your Google account. Grant the necessary permissions. Repeat this for the Add to Knowledge Base node, selecting the credential you just created. 3. Set up Your Google Sheet Knowledge Base: Create a new Google Sheet in your Google Drive. Rename the first sheet (tab) to QA Database. In the first row of QA Database, add two column headers: Question (in cell A1) and Answer (in cell B1). Go back to the 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. 4. Get Your Google AI API Key (for Gemini Models): Visit Google AI Studio at aistudio.google.com/app/apikey. Click "Create API key in new project" and copy the key. In the workflow, go to the Google Gemini 2.5 Pro node, click the Credential dropdown, and select + Create New Credential. Paste your key into the API Key field and Save. Repeat this for the Google Gemini 2.5 Flash Lite and Google Gemini 2.5 Flash nodes, selecting the credential you just created. 5. Configure Human Expert Email: Select the Ask Human for Help node. In the Send To field, replace the placeholder email address with the actual email address of your human expert (e.g., your own email or a team support email). 6. Activate the Workflow: Once all credentials and configurations are set, activate the workflow using the toggle switch at the top right of your n8n canvas. 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!

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Create a new Google Sheets row for every new Asana task

Automatically log every new Asana task into Google Sheets. Keep track of tasks effortlessly by adding a new row for each task.

Free

Create Notion database items from new Google Sheets rows

Automatically generate new Notion database items each time a row is added to your Google Sheets spreadsheet

Free

✉️ Automated email sorting & drafting for customer support - with AI 🤖

Automated Email Sorting & FAQ Reply Assistant (n8n + Gemini AI) 🔍 Overview This n8n workflow automates email triage and FAQ responses using Google Sheets and Gemini AI. It’s designed to: - Automatically sort incoming emails into categories (e.g., FAQ, Billing, Tech Support). - Draft polite, relevant replies for FAQ emails using AI, grounded in your pre-approved content. - Maintain a human-in-the-loop process by saving responses as Gmail drafts for manual review. Perfect for startups or teams see

Free

Create contacts on your iOS device from new rows in a Google Sheets spreadsheet

Every time a new row is created in a Google Sheets spreadsheet, Make will automatically create a new contact on your Apple iOS device. The template uses this [example spreadsheet](https://goo.gl/boNvUK).

Free

WordPress blog generation with AI Research, Image Creation & Auto Publishing

How This N8n Workflow Works This is an automated blog post generation system that: 1. Researches topics using AI agents and web search tools 2. Writes complete blog posts with proper SEO structure 3. Generates custom images for each post 4. Publishes directly to WordPress with images embedded Setup Steps 1. API Keys & Credentials - Set in "API Keys" node: - tavily: Get from tavily.com (free tier available) - wavespeed: Get from wavespeed.ai for image generation - wordpress-website-url: Your W

Free

Save new SendGrip recipients to Google Sheets

Every time a new recipient is created in SendGrid, Make will automatically add that recipient to a new row in your Google Sheets spreadsheet. The template uses this [example spreadsheet]( https://goo.gl/K1djMm).

Free

Create a REST API for PDF digital signatures with webhooks

Overview An automation workflow that creates a complete REST API for digitally signing PDF documents using n8n webhooks. This service demonstrates how to implement secure document signing functionality through standardized API endpoints with file upload and download capabilities. Use Case This workflow is designed for developers and automation specialists who need to implement digital document signing. It's particularly useful for: - Integrating PDF signing capabilities into existing document wo

Free

Auto-send WooCommerce invoices via WhatsApp with Rapiwa API

Who is this for? This workflow listens for new or updated WooCommerce orders, cleans and structures the order data, processes orders in batches, and standardizes WhatsApp phone numbers. It verifies phone numbers via the Rapiwa API, sends invoice links or messages to verified numbers, and logs results into separate Google Sheets tabs for verified and unverified numbers. Throttling and looping are managed using batch processing and wait delays. What this Workflow Does - Receives order events (e.g.

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free