Skip to main content

Dual-path customer support system with Google Sheets, vectors & Gemini

Workflow preview

Workflow preview
100%
Dual-path customer support system with Google Sheets, vectors & Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow template implements a dual path architecture for AI customer support, based on the principles outlined in the research paper "[A Locally Executable AI System for Improving Preoper...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.embeddingshuggingfaceinference, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.chat, n8n-nodes-base.stickynote, n8n-nodes-base.googlesheets, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Maxim Osipovs.

Original n8n.io source

1.1 Workflow description

Title
Dual-path customer support system with Google Sheets, vectors & Gemini
Workflow name
Dual-path customer support system with Google Sheets, vectors & Gemini
This n8n workflow template implements a dual-path architecture for AI customer support, based on the principles outlined in the research paper "A Locally Executable AI System for Improving Preoperative Patient Communication: A Multi-Domain Clinical Evaluation" (Sato et al.).

The system, named LENOHA (Low Energy, No Hallucination, Leave No One Behind Architecture), uses a high-precision classifier to differentiate between high-stakes queries and casual conversation. Queries matching a known FAQ are answered with a pre-approved, verbatim response, structurally eliminating hallucination risk. All other queries are routed to a standard generative LLM for conversational flexibility.

This template provides a practical ++blueprint++ for building safer, more reliable, and cost-efficient AI agents, particularly in regulated or high-stakes domains where factual accuracy is critical.

What This Template Does (Step-by-Step)

  • Loads an expert-curated FAQ from Google Sheets and creates a searchable vector store from the questions during a one-time setup flow.
  • Receives incoming user queries in real-time via a chat trigger.
  • Classifies user intent by converting the query to an embedding and searching the vector store for the most semantically similar FAQ question.
  • Routes the query down one of two paths based on a configurable similarity score threshold.
  • Responds with a verbatim, pre-approved answer if a match is found (safe path), or generates a conversational reply via an LLM if no match is found (casual path).

Important Note for Production Use

This template uses an in-memory Simple Vector Store for demonstration purposes. For a production application, this should be replaced with a persistent vector database (e.g., Pinecone, Chroma, Weaviate, Supabase) to store your embeddings permanently.

Required Integrations:

  • Google Sheets (for the FAQ knowledge base)
  • Hugging Face API (for creating embeddings)
  • An LLM provider (e.g., OpenAI, Anthropic, Mistral)
  • (Recommended) A persistent Vector Store integration.

Best For:

🏦 Organizations in regulated industries (finance, healthcare) requiring high accuracy. πŸ’° Applications where reducing LLM operational costs is a priority. βš™οΈ Technical support agents that must provide precise, unchanging information. πŸ”’ Systems where auditability and deterministic responses for known issues are required.

Key Benefits:

βœ… Structurally eliminates hallucination risk for known topics. βœ… Reduces reliance on expensive generative models for common queries. βœ… Ensures deterministic, accurate, and consistent answers for your FAQ. βœ… Provides high-speed classification via vector search. βœ… Implements a research-backed architecture for building safer AI systems.

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - When clicking β€˜Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Embeddings HuggingFace Inference

Type / Role
@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference - embeddingsHuggingFaceInference
Config choices
Version 1

Block 3 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 4 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 5 - Respond to Chat

Type / Role
@n8n/n8n-nodes-langchain.chat - chat
Config choices
Version 1

Block 6 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Embeddings HuggingFace Inference2

Type / Role
@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference - embeddingsHuggingFaceInference
Config choices
Version 1

Block 12 - Respond to Chat1

Type / Role
@n8n/n8n-nodes-langchain.chat - chat
Config choices
Version 1

Block 13 - Knowledge Database

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 14 - Extract Questions

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 15 - Generate & Store Embeddings

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.3

Block 16 - Retrieve & Score Embeddings

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.2

Block 17 - Determine Question Type

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Get Respective Answers

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 19 - Forward Chat Message

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 20 - Chat Model

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1

3. Summary Table

Workflow Dual-path customer support system with Google Sheets, vectors & Gemini
Complexity advanced
Nodes 20
Categories Support Chatbot, AI RAG
Author Maxim Osipovs
Published 16 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9775/9775.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Dual-path customer support system with Google Sheets, vectors & Gemini do?

This n8n workflow template implements a dual path architecture for AI customer support, based on the principles outlined in the research paper "[A Locally Executable AI System for Improving Preoper...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 RAG use case.