Skip to main content

Create an AI-powered Telegram customer support bot with lead management

Workflow preview

Workflow preview
100%
Create an AI-powered Telegram customer support bot with lead management preview
Open on n8n.io

Important notice

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

1. Workflow Overview

AI Telegram Customer Support Assistant + Lead Manager This n8n workflow provides a fully automated AI driven customer support assistant connected to Telegram, with built in lead management, know...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatopenrouter, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote, n8n-nodes-base.telegramtrigger, n8n-nodes-base.datatable, n8n-nodes-base.datatabletool, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.telegram

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Create an AI-powered Telegram customer support bot with lead management
Workflow name
Create an AI-powered Telegram customer support bot with lead management

🧠 AI Telegram Customer Support Assistant + Lead Manager

This n8n workflow provides a fully automated AI-driven customer support assistant connected to Telegram, with built-in lead management, knowledge-base querying, and context-aware answers.

⭐ What this workflow does

Receives user messages from Telegram

Logs all incoming/outgoing messages into a Data Table

Checks if a lead exists for the user (via chat_id)

Creates new leads automatically if needed

Builds an AI-ready context (user info + lead info + latest message)

Uses the AI Agent to answer questions using:

FAQ database

Services table (programs, prices, descriptions)

Settings table (agency info)

Lead update tool

Sends a natural, friendly reply back to Telegram

Updates leads in real time (name, phone, email, notes…)

📦 Required Data Tables (to be created by the user)

leads Stores all user information (full_name, phone, email, etc.)

services List of available programs/services with prices, duration, category.

faq Frequently asked questions with answers and optional tags.

settings Company/agency details used by the assistant.

chat_logs Logs all messages exchanged with users (user + bot).

🔧 Required Credentials

Telegram Bot API Key

AI Model Credential (OpenAI, OpenRouter, Groq…)

No other credentials required.

🚀 How to use it

Import the workflow into your n8n instance

Create the required Data Tables as defined inside the Sticky Notes

Add your credentials (Telegram + AI Model)

Customize the prompt to match your business

Activate the workflow — you're ready to go!

💡 Suitable for:

Travel agencies

Customer support chatbots

Lead qualification + automation

AI knowledge-based assistants

Telegram-first businesses

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 - OpenRouter Chat Model

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

Block 2 - Simple Memory

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

Block 3 - Sticky Note

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

Block 4 - Telegram - Incoming Message

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

Block 5 - Log - User Message

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

Block 6 - Log - Bot Message

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

Block 7 - DB - Get Lead by User ID

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

Block 8 - DB - Create Lead

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

Block 9 - DB - Update Lead

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

Block 10 - AI - Smart Support Assistant

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

Block 11 - DB - Get FAQ

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

Block 12 - DB - Get Services

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

Block 13 - DB - Get Settings

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

Block 14 - Telegram - Send Response

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

Block 15 - Build Assistant Context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Check – Lead Record

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

Block 17 - Sticky Note4

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

Block 18 - Sticky Note5

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

Block 19 - Sticky Note7

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

Block 20 - Sticky Note8

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

Block 21 - Sticky Note9

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

Block 22 - Sticky Note1

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

Block 23 - Sticky Note2

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

3. Summary Table

Workflow Create an AI-powered Telegram customer support bot with lead management
Complexity advanced
Nodes 23
Categories Support Chatbot, AI Chatbot
Author osama goda
Published 23 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11165/11165.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 Create an AI-powered Telegram customer support bot with lead management do?

AI Telegram Customer Support Assistant + Lead Manager This n8n workflow provides a fully automated AI driven customer support assistant connected to Telegram, with built in lead management, know...

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