Skip to main content

Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram

Workflow preview

Workflow preview
100%
Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who’s it for This template is designed for small and medium businesses, startups, and agencies that want to automate customer inquiries, provide instant support, and capture leads without losing va...

Best for

  • Support Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolvectorstore, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.stickynote, n8n-nodes-base.telegramtool

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Karol Otręba.

Original n8n.io source

1.1 Workflow description

Title
Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram
Workflow name
Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram

Who’s it for

This template is designed for small and medium businesses, startups, and agencies that want to automate customer inquiries, provide instant support, and capture leads without losing valuable conversations. It’s especially useful for teams that get many repetitive questions about products, services, or locations but don’t want to miss out on collecting contact details for follow-up.

What it does / How it works

The workflow creates a 24/7 AI-powered chatbot that answers company-related questions and collects customer information. It uses: • GPT-4o for natural conversations • Pinecone Vector Store for Retrieval-Augmented Generation (RAG) with your company knowledge base • Google Sheets to store structured lead data • Telegram to instantly notify your team

When a customer asks about products, services, or hours, the AI answers using the Pinecone database. Afterwards, it politely asks for their name, email, phone number, and interest. The details are saved to Google Sheets and your team receives a Telegram message with a summary.

How to set up 1. Connect your OpenAI account. 2. Create a Pinecone index with company FAQs, documents, or policies. 3. Link your Google Sheet with columns: Name, Email, Phone, Interested in. 4. Add your Telegram bot token and chat/group ID. 5. Replace [INSERT_YOUR_COMPANY_NAME_HERE] in the system prompt with your company name.

Requirements • OpenAI API key • Pinecone account • Google Sheets access • Telegram bot & chat ID

How to customize • Change the system prompt to match your brand’s tone. • Update the Pinecone namespace and embeddings model if needed. • Add extra fields in Google Sheets (e.g., “Budget” or “Preferred product”). • Extend the flow with CRM integrations or automated email follow-ups.

With this setup, you get a smart, RAG-powered chatbot that not only answers questions but also turns every conversation into a potential lead.

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 chat message received

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

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 3 - Conversation Memory

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

Block 4 - Company Q&A

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

Block 5 - Pinecone Vector Store (Company KB)

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

Block 6 - Generate Embeddings (OpenAI)

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

Block 7 - Trigger – How to Publish

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

Block 8 - AI Agent – Flow

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

Block 9 - RAG Database – Setup

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

Block 10 - Send Lead to Telegram

Type / Role
n8n-nodes-base.telegramTool - telegramTool
Config choices
Version 1.2

Block 11 - Save Lead to Google Sheets

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

Block 12 - Company Answering Model

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

Block 13 - Main Chat Model

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

Block 14 - Template Guide

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

3. Summary Table

Workflow Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram
Complexity intermediate
Nodes 14
Categories Support Chatbot
Author Karol Otręba
Published 03 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9234/9234.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 Customer support & lead collection chatbot with RAG, GPT-4o, Sheets & Telegram do?

Who’s it for This template is designed for small and medium businesses, startups, and agencies that want to automate customer inquiries, provide instant support, and capture leads without losing va...

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