This workflow corresponds to n8n.io template #11165 β we link there as the canonical source.
This workflow follows the Agent β Datatable recipe pattern β see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide β
{
"id": "m7f6djin9Wz95S8C",
"name": "AI Telegram Customer Support Assistant with Lead Management",
"tags": [],
"nodes": [
{
"id": "71b9a677-06e0-42e3-aa8f-578e6247a382",
"name": "OpenRouter Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
2208,
656
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5136fc3a-6577-4441-ad57-fcc5b0cea2d1",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
2432,
656
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "189a1715-dc89-4d39-ae62-d6f80d9ee11d",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1104,
-224
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "3b6dd5eb-8837-4f95-89c8-549743f8def0",
"name": "Telegram - Incoming Message",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
176,
32
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "daf6ca06-da61-4ace-a33c-706453e1e0eb",
"name": "Log - User Message",
"type": "n8n-nodes-base.dataTable",
"position": [
576,
32
],
"parameters": {},
"typeVersion": 1
},
{
"id": "37a85b98-ad4d-4d64-9836-217313851e48",
"name": "Log - Bot Message",
"type": "n8n-nodes-base.dataTable",
"position": [
3536,
48
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8c821185-dd04-4282-aa6d-7867dad10925",
"name": "DB - Get Lead by User ID",
"type": "n8n-nodes-base.dataTable",
"position": [
912,
32
],
"parameters": {},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "c340ee82-44f7-4e05-a16f-8b48a1601144",
"name": "DB - Create Lead",
"type": "n8n-nodes-base.dataTable",
"position": [
1504,
176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c8c81aea-6385-4389-ac8c-1a934d7dcef1",
"name": "DB - Update Lead",
"type": "n8n-nodes-base.dataTableTool",
"position": [
2624,
656
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6c98a92e-1cfb-4505-ac62-8046a37e0961",
"name": "AI - Smart Support Assistant",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2512,
32
],
"parameters": {},
"typeVersion": 3
},
{
"id": "4d0d1528-2c4f-45de-ac2e-f699a3a75abd",
"name": "DB - Get FAQ",
"type": "n8n-nodes-base.dataTableTool",
"position": [
2816,
656
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c757970a-3e13-4f4f-b8b2-325b2aa45d16",
"name": "DB - Get Services",
"type": "n8n-nodes-base.dataTableTool",
"position": [
3008,
656
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3076d9aa-0a6c-40dc-9334-f622ed3b2a5e",
"name": "DB - Get Settings",
"type": "n8n-nodes-base.dataTableTool",
"position": [
3216,
656
],
"parameters": {},
"typeVersion": 1
},
{
"id": "54170bbc-6047-4939-bd57-9afae970e3ac",
"name": "Telegram - Send Response",
"type": "n8n-nodes-base.telegram",
"position": [
3936,
48
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "88ed32c8-977f-4cd5-a2f8-11d6aca1c264",
"name": "Build Assistant Context",
"type": "n8n-nodes-base.code",
"position": [
1856,
32
],
"parameters": {},
"typeVersion": 2
},
{
"id": "07268ffc-f684-439c-9a93-bc67358a25bf",
"name": "Check \u2013 Lead Record",
"type": "n8n-nodes-base.if",
"position": [
1168,
32
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "5103c661-3efa-4f1f-af92-6d8c77353406",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-176
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "c94e776e-463f-431c-8aaf-f38a082413c8",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
848,
-112
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f148c107-9abd-4b44-853b-bf285bf31caa",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2128,
-144
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0f98316e-2b53-4d2e-9e9b-7af3c5c235c1",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
3472,
-112
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b049cb8c-13b3-452a-a775-5aeebdbcc72d",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
496,
-128
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "5dc04310-c03e-4a47-a6f5-a236c8e64833",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1776,
-144
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "4119ca42-0805-4120-b665-4757174a2d11",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
3856,
-112
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "f837f879-f201-4405-affe-dfd1aa6b81e1",
"connections": {
"DB - Get FAQ": {
"ai_tool": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_tool",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_memory",
"index": 0
}
]
]
},
"DB - Create Lead": {
"main": [
[
{
"node": "Build Assistant Context",
"type": "main",
"index": 0
}
]
]
},
"DB - Update Lead": {
"ai_tool": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_tool",
"index": 0
}
]
]
},
"DB - Get Services": {
"ai_tool": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_tool",
"index": 0
}
]
]
},
"DB - Get Settings": {
"ai_tool": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_tool",
"index": 0
}
]
]
},
"Log - Bot Message": {
"main": [
[
{
"node": "Telegram - Send Response",
"type": "main",
"index": 0
}
]
]
},
"Log - User Message": {
"main": [
[
{
"node": "DB - Get Lead by User ID",
"type": "main",
"index": 0
}
]
]
},
"Check \u2013 Lead Record": {
"main": [
[
{
"node": "Build Assistant Context",
"type": "main",
"index": 0
}
],
[
{
"node": "DB - Create Lead",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "AI - Smart Support Assistant",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Build Assistant Context": {
"main": [
[
{
"node": "AI - Smart Support Assistant",
"type": "main",
"index": 0
}
]
]
},
"DB - Get Lead by User ID": {
"main": [
[
{
"node": "Check \u2013 Lead Record",
"type": "main",
"index": 0
}
]
]
},
"Telegram - Incoming Message": {
"main": [
[
{
"node": "Log - User Message",
"type": "main",
"index": 0
}
]
]
},
"AI - Smart Support Assistant": {
"main": [
[
{
"node": "Log - Bot Message",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
π§ AI Telegram Customer Support Assistant + Lead Manager
Source: https://n8n.io/workflows/11165/ β original creator credit. Request a take-down β
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
A comprehensive n8n workflow demonstrating advanced AI agent orchestration, stateful conversation management, and multi-modal input processing for nutrition tracking applications.
This is a Telegram AI-to-Human Handover System that seamlessly transitions customer support conversations between an AI agent and human operators: AI-First Response: When users message the Telegram bo
ITfest. Uses telegramTrigger, telegram, textClassifier, agent. Event-driven trigger; 70 nodes.
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.
AI-powered Telegram bot for effortless expense tracking. Send receipts, voice messages, or text - the bot automatically extracts and categorizes your expenses. πΈ Receipt & Invoice OCR - Send photos of