基于 InfraNodus GraphRAG 知识库的 Telegram AI 聊天机器人代理
高级
这是一个Support, AI领域的自动化工作流,包含 21 个节点。主要使用 Telegram, Agent, HttpRequestTool, TelegramTrigger, LmChatOpenAi 等节点,结合人工智能技术实现智能自动化。 集成 InfraNodus GraphRAG 知识库的 Telegram AI 聊天机器人代理
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "dHmXMjhXw6tqnf8y",
"meta": {
"instanceId": "2a26454b0172ffcb8d70ba77c235b1209f92cd71bf06c79ba609c7173b416d68",
"templateCredsSetupCompleted": true
},
"name": "基于InfraNodus GraphRAG知识库的Telegram AI聊天机器人代理",
"tags": [
{
"id": "66wgFoDi9Xjl74M3",
"name": "Support",
"createdAt": "2025-05-21T17:06:32.355Z",
"updatedAt": "2025-05-21T17:06:32.355Z"
},
{
"id": "9QurS5Kb1CkCYrnG",
"name": "Product",
"createdAt": "2025-05-21T17:06:29.704Z",
"updatedAt": "2025-05-21T17:06:29.704Z"
},
{
"id": "IzYV3Gv55x1h73cK",
"name": "Ideation",
"createdAt": "2025-05-20T14:53:20.662Z",
"updatedAt": "2025-05-20T14:53:20.662Z"
},
{
"id": "aECLdyckoPZ29skg",
"name": "Writing",
"createdAt": "2025-05-20T14:53:23.085Z",
"updatedAt": "2025-05-20T14:53:23.085Z"
},
{
"id": "ciIq4giMNXaJiyiQ",
"name": "Thinking Tools",
"createdAt": "2025-05-20T14:53:17.515Z",
"updatedAt": "2025-05-20T14:53:17.515Z"
},
{
"id": "hCzs9EJfBuD0RxuX",
"name": "Other",
"createdAt": "2025-05-21T17:06:34.674Z",
"updatedAt": "2025-05-21T17:06:34.674Z"
},
{
"id": "sJk9cUvmMU8FkJXv",
"name": "AI",
"createdAt": "2025-05-20T13:16:15.636Z",
"updatedAt": "2025-05-20T13:16:15.636Z"
}
],
"nodes": [
{
"id": "736e717e-bad8-4943-9ae2-955cf588112d",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-800
],
"parameters": {
"color": 6,
"width": 540,
"height": 760,
"content": "## 配备专家系统的AI聊天机器人代理"
},
"typeVersion": 1
},
{
"id": "e966551c-01db-4b3e-a233-632ce1c24d2f",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
620,
260
],
"parameters": {
"width": 200,
"height": 540,
"content": "## 聊天记忆"
},
"typeVersion": 1
},
{
"id": "d1507b1d-238f-4ff1-a181-e8120c838714",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
-260
],
"parameters": {
"width": 460,
"height": 400,
"content": "## 3. AI代理工作流"
},
"typeVersion": 1
},
{
"id": "9cd0245e-a848-487a-bca7-22f8cf1ec95f",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
20
],
"parameters": {
"height": 500,
"content": "## 1. Telegram触发器"
},
"typeVersion": 1
},
{
"id": "dc80cc79-24e7-4a43-8869-ba1ef48e2026",
"name": "OpenAI模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
400,
320
],
"parameters": {
"model": "gpt-4o",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "07wFa8Wa4mMRCHAj",
"name": "OpenAi account 2"
}
},
"typeVersion": 1
},
{
"id": "a9000f01-714b-4f85-86f4-29592178eb44",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
680,
300
],
"parameters": {
"sessionKey": "={{ $('Receive a Message on Telegram').item.json.message.chat.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "3ec5c404-69f4-468f-a5cc-9500e207e2ed",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
20
],
"parameters": {
"width": 260,
"height": 500,
"content": "## 2. 向用户提供反馈"
},
"typeVersion": 1
},
{
"id": "c4edb9b5-7293-490d-a718-ebaf0bb3aeb0",
"name": "接收Telegram消息",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-200,
40
],
"webhookId": "aa8d195c-01c2-435b-9d88-87b38306a6a6",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "RoCnmnDFLL2S3f81",
"name": "Dmitry's Books Bot"
}
},
"typeVersion": 1.2
},
{
"id": "3023c0bc-f219-4b24-b889-726112808b70",
"name": "向用户发送\"正在输入...\"消息",
"type": "n8n-nodes-base.telegram",
"position": [
100,
40
],
"webhookId": "845f29dd-9da3-4ac9-86d1-22280acbb46a",
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"operation": "sendChatAction"
},
"credentials": {
"telegramApi": {
"id": "RoCnmnDFLL2S3f81",
"name": "Dmitry's Books Bot"
}
},
"typeVersion": 1.2
},
{
"id": "a698860d-e2dd-4679-be0a-d8c36d12f9ba",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
-260
],
"parameters": {
"width": 260,
"height": 380,
"content": "## 4. 响应用户"
},
"typeVersion": 1
},
{
"id": "879d4e7a-c2c7-47eb-aaca-4847e61d6886",
"name": "向用户发送Telegram消息",
"type": "n8n-nodes-base.telegram",
"position": [
1160,
-40
],
"webhookId": "a6b9e331-2b1a-4056-a9fc-5d10b7196c54",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Receive a Message on Telegram').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "RoCnmnDFLL2S3f81",
"name": "Dmitry's Books Bot"
}
},
"typeVersion": 1.2
},
{
"id": "1bc915c9-8494-4c74-b508-80484e9bc290",
"name": "AI代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
540,
0
],
"parameters": {
"text": "={{ $('Receive a Message on Telegram').item.json.message.text }}",
"options": {
"systemMessage": "You are well-versed on Dmitry Paranyushkin's books through the tools you have access to. When you receive a user's query, you can modify it to suit better each tool's context. Always access at least one of the tools and deliver an augmented response.\n\nWhen you're generating a response, attempt to combine perspectives where they fit and point out discrepancies when they exist."
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "75db20b3-7a82-49db-a574-66b0ce0a9560",
"name": "《波浪与模式》书籍专家",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1120,
300
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeGraph=false&includeGraphSummary=true&includeStatements=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "special_agents_manual"
},
{
"name": "prompt",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `User's request adjusted to suit this context`, 'string') }}"
},
{
"name": "requestMode",
"value": "response"
},
{
"name": "aiTopics",
"value": "true"
}
]
},
"genericAuthType": "httpBearerAuth",
"toolDescription": "Make a request to The Waves into Patterns book which is well-versed in the questions of natural cycles, variability, fractal states, dynamics, and nonequilibrium stability. Including the following topics:\n\n<MainTopics>: \n1. System Influence: scale influence multiple \n2. Pattern Dynamics: pattern variability fractal \n3. Change Balance: dynamic wave time \n4. Center Transformation: center cycle dominant \n5. Growth Stages: growth exploration period \n6. Long Strategy: term state long \n7. Seasonal Relations: moon summer natural \n8. Flow Connection: exist breaking exploring \n</MainTopics>"
},
"credentials": {
"httpBearerAuth": {
"id": "kg0rA5r8siL8LbrU",
"name": "InfraNodus Circadian API Key"
}
},
"typeVersion": 4.2
},
{
"id": "791b109a-f7f4-4391-86ce-4db6315fcd95",
"name": "《特工手册》书籍专家",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
900,
300
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeGraph=false&includeGraphSummary=true&includeStatements=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "special_agents_manual"
},
{
"name": "prompt",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `User's request adjusted to suit this context`, 'string') }}"
},
{
"name": "requestMode",
"value": "response"
},
{
"name": "aiTopics",
"value": "true"
}
]
},
"genericAuthType": "httpBearerAuth",
"toolDescription": "Make a request to The Special Agent's Manual book which is well-versed in the questions of human agency, speciality, infiltration and tension dynamics, strategies, identities, finding the special in you as well as the following topics:\n\n<MainTopics>: \n1. Agent Activation: agent special activation \n2. System Dynamics: system body operating \n3. Order Flow: action time order \n4. Creative Process: create identity entity \n5. Movement Patterns: movement wave breathing \n6. Incoming Impact: incoming impulse impact \n7. Fiction Venture: fiction high risk \n8. Social Framework: preset possibility level \n</MainTopics>"
},
"credentials": {
"httpBearerAuth": {
"id": "kg0rA5r8siL8LbrU",
"name": "InfraNodus Circadian API Key"
}
},
"typeVersion": 4.2
},
{
"id": "c1a5628c-aa40-451b-b9ac-0cd9ba98dce1",
"name": "《流动与概念》书籍",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1340,
300
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeGraph=false&includeGraphSummary=true&includeStatements=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "the_flow_and_notion"
},
{
"name": "prompt",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `User's request adjusted to suit this context`, 'string') }}"
},
{
"name": "requestMode",
"value": "response"
},
{
"name": "aiTopics",
"value": "true"
}
]
},
"genericAuthType": "httpBearerAuth",
"toolDescription": "The Flow and the Notion book which is well-versed in the questions of creating with someone, dreaming, making new shapes, dissipating ideas, art, and life. Including the following topics:\n\n<MainTopics>: \n1. Shape Dynamics: shape outline concentric \n2. Time Alignment: long practice time \n3. Man's Journey: bow man candle \n4. Notion Flow: image flow paranyushkin \n5. Essence Realization: process essence essential \n6. Life Choices: slave thing trace \n7. Wave Patterns: found light movement \n8. Synchrony Mediation: book circadian word \n9. Complete Vision: multiple synchrony mediate \n10. Instruction Guide: full \ninstruction foreword : instruction foreword \n</MainTopics>"
},
"credentials": {
"httpBearerAuth": {
"id": "kg0rA5r8siL8LbrU",
"name": "InfraNodus Circadian API Key"
}
},
"typeVersion": 4.2
},
{
"id": "e7cc5883-e814-4ed8-95fb-8c7294466e31",
"name": "《多元奇点书信集》书籍",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1540,
300
],
"parameters": {
"url": "https://infranodus.com/api/v1/graphAndAdvice?doNotSave=true&addStats=true&optimize=develop&includeGraph=false&includeGraphSummary=true&includeStatements=true",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "name",
"value": "polysingularity_letters"
},
{
"name": "prompt",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `User's request adjusted to suit this context`, 'string') }}"
},
{
"name": "requestMode",
"value": "response"
},
{
"name": "aiTopics",
"value": "true"
}
]
},
"genericAuthType": "httpBearerAuth",
"toolDescription": "The Polysingularity Letters book which is well-versed in the questions of polysingularity, multiplicity, networks, networking, art, and creative approach. And also these topics:\n\n<MainTopics>: \n1. Community Dynamics: network community connected \n2. Global Equilibrium: state global change \n3. Polysingular Practice: polysingularity thinking exist \n4. Temporal Relations: time moment thing \n5. Consciousness Source: social cognition view \n6. Meaning Creation: make orthodox meaning \n7. Dmitry Connections: post dmitry minute \n8. Linguistic Variations: wa ë ww \n</MainTopics>"
},
"credentials": {
"httpBearerAuth": {
"id": "6lSuuSDajZrvI2GM",
"name": "InfraNodus API Key"
}
},
"typeVersion": 4.2
},
{
"id": "e9b348cc-d6ea-4a46-99cf-cf395a50ab6e",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
560
],
"parameters": {
"color": 3,
"width": 540,
"height": 820,
"content": "## 设置Telegram机器人"
},
"typeVersion": 1
},
{
"id": "75e639fa-33dc-4fbc-a34d-dee9e5550969",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
260
],
"parameters": {
"width": 200,
"height": 740,
"content": "## 专家 #1"
},
"typeVersion": 1
},
{
"id": "8bb5f9fd-3a31-4c67-8684-b7190a342b2a",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1060,
260
],
"parameters": {
"width": 200,
"height": 740,
"content": "## 专家 #2"
},
"typeVersion": 1
},
{
"id": "e2e4dd57-fdb2-4ed3-940f-085e4b1a0934",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
260
],
"parameters": {
"width": 200,
"height": 640,
"content": "## 专家 #3"
},
"typeVersion": 1
},
{
"id": "af7c969d-e48d-4d36-8e71-a7c70b79763d",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1500,
260
],
"parameters": {
"width": 200,
"height": 640,
"content": "## 专家 #4"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "5ad178b3-764a-40eb-a074-e768b615960f",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send Telegram Message to User",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"The Flow and the Notion Book": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Receive a Message on Telegram": {
"main": [
[
{
"node": "Send \"Typing...\" message to User",
"type": "main",
"index": 0
}
]
]
},
"Waves into Patterns Book Expert": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Send \"Typing...\" message to User": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"The Polysingularity Letters Book": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Special Agent's Manual Book Expert": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户支持, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI Chatbot Agent:使用 InfraNodus 图 RAG 知识的专家小组
采用InfraNodus GraphRAG知识图谱技术的专家小组AI聊天机器人代理
Agent
Http Request Tool
Chat Trigger
+3
14 节点InfraNodus
客户支持
集成ElevenLabs和InfraNodus图RAG知识的AI语音聊天助手
构建集成ElevenLabs和InfraNodus知识专家的语音AI聊天机器人
Webhook
Agent
Http Request Tool
+4
19 节点InfraNodus
销售
使用GraphRAG与PDF/MD/文本文件对话(无需向量存储)
使用GraphRAG与PDF/MD/文本文件对话(无需向量存储)
Set
Switch
Google Drive
+10
20 节点InfraNodus
客户支持
Airbnb Telegram代理 - 模板
Airbnb Telegram代理 - 支持语音的AI驱动住宿搜索
Set
Switch
Telegram
+8
15 节点Friedemann Schuetz
客户支持
🤖 智能客服AI代理
使用Gmail、Telegram和GPT AI自动化多渠道客户支持
Set
Gmail
Telegram
+10
23 节点RedOne
客户支持
基于语义和结构化RAG的电子邮件聊天机器人,使用Telegram和Pgvector
使用Telegram、Mistral和Pgvector的RAG技术与您的邮件历史对话
If
Set
Code
+12
20 节点Alfonso Corretti
客户支持
工作流信息
难度等级
高级
节点数量21
分类2
节点类型7
作者
InfraNodus
@infranodusI'm Dmitry, the founder of InfraNodus — an AI text network analysis tool. I'm passionate about networks and data visualization and its ability to reveal what everyone else is missing and to highlight different perspectives. I'm sharing the n8n templates that make use of this unique capability of InfraNodus for multiple scenarios.
外部链接
在 n8n.io 查看 →
分享此工作流