Telegram 명령 센터
고급
이것은Support Chatbot, AI Chatbot분야의자동화 워크플로우로, 23개의 노드를 포함합니다.주로 If, Set, Code, Switch, Telegram 등의 노드를 사용하며. Telegram 봇 명령 센터를 사용한 워크플로 실행 자동화
사전 요구사항
- •Telegram Bot Token
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "HSaX5xivT2KAYNcX",
"meta": {
"instanceId": "e9707613f506bdbcb79075f3617d27a010060d5fd1f76550283efabc82686f47",
"templateCredsSetupCompleted": true
},
"name": "Telegram Command Center",
"tags": [],
"nodes": [
{
"id": "1f10be35-1365-41cf-a310-d3b3a4a6f2d0",
"name": "Telegram 트리거",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-224,
-768
],
"webhookId": "ee3d0945-bb90-4edb-aeec-a12981bf91c2",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "5c258bb2-3ba3-44cf-bad0-7ed9c83754e0",
"name": "format_output_as_json",
"type": "n8n-nodes-base.code",
"onError": "continueRegularOutput",
"disabled": true,
"position": [
1456,
-384
],
"parameters": {
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n// The input is an array of items. We'll work with the first item.\n\n\n// Access the string value from the 'output' field in the input JSON.\nconst rawStringWithMarkdown = item.json.output;\nconsole.log(item.json.output)\n// The JSON we want is nested inside a markdown code block (```json ... ```).\n// We need to extract just the JSON part.\n\n// Find the first occurrence of '{' to locate the start of the JSON object.\nconst jsonStartIndex = rawStringWithMarkdown.indexOf('{');\n\n// Find the last occurrence of '}' to locate the end of the JSON object.\nconst jsonEndIndex = rawStringWithMarkdown.lastIndexOf('}');\n\n// Slice the string from the start to the end to get only the clean JSON string.\n// We add +1 to jsonEndIndex because substring's second argument is exclusive.\nconst cleanJsonString = rawStringWithMarkdown.substring(jsonStartIndex, jsonEndIndex + 1);\n\n// Parse the cleaned string into a proper, usable JSON object.\nconst parsedJson = JSON.parse(cleanJsonString);\n\n// Return the parsed JSON object. The keys (symbol, sentiment_score, etc.)\n// will become individual fields in the n8n output for the next node to use.\nreturn parsedJson;}\n\n"
},
"executeOnce": false,
"retryOnFail": false,
"typeVersion": 2,
"alwaysOutputData": false
},
{
"id": "c2d15090-96f3-46f3-a39a-3d6b880feeaa",
"name": "Generic Output",
"type": "n8n-nodes-base.telegram",
"position": [
1680,
-816
],
"webhookId": "9d8bc712-a61a-4508-a7c3-3c6ba6d723ab",
"parameters": {
"text": "={{ $json.output ?? \"\" }}\n{{ $json.text ?? \"\" }}\n{{ $json.html ?? \"\" }}\n---\nCommand:{{ $node[\"Seperate command and Parameter\"].json[\"command\"] }}\nParameter: {{ $node[\"Seperate command and Parameter\"].json[\"rest\"] }}\n",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "10b63b94-03f5-4728-9d9d-36b333eaa1fa",
"name": "Processing has finished",
"type": "n8n-nodes-base.telegram",
"position": [
1680,
-1040
],
"webhookId": "e34df91c-d4bd-4773-b2a2-6643fc55979f",
"parameters": {
"text": "=Processing has finished.\n\nCommand:{{ $node[\"Seperate command and Parameter\"].json[\"command\"] }}\nParameter: {{ $node[\"Seperate command and Parameter\"].json[\"rest\"] }}\n",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "2ddf08dd-759d-4dad-81fd-4e7fad69a628",
"name": "Instagram post",
"type": "n8n-nodes-base.executeWorkflow",
"disabled": true,
"position": [
1248,
-816
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "id",
"value": ""
}
},
"typeVersion": 1.2
},
{
"id": "1b33a651-c6a9-4f4a-aa69-0a123866c0e7",
"name": "메모",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-1024
],
"parameters": {
"width": 448,
"height": 736,
"content": "1. Telegram message Trigger\n2. If permission granted workflow proceed unless send permission denid message to the user with his ID."
},
"typeVersion": 1
},
{
"id": "079c8a6b-0f36-4439-baf2-6e2e5fde033a",
"name": "메모1",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
-1024
],
"parameters": {
"width": 656,
"height": 736,
"content": "1. Seperate Command and Paremeter\n1. Set list command reply\n1. Route the flow based on command"
},
"typeVersion": 1
},
{
"id": "57fdb67c-d3ce-4620-b9a7-1de296f15534",
"name": "메모2",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
-1296
],
"parameters": {
"width": 1120,
"height": 1088,
"content": "Define behaviour for each command.\n1. Switch will route command to the right flow,\n1. you can call the sub workflow for relevant action, by useing sub-workflow node (just update the node)\n1. you have access to \ncommand by: $node[\"Seperate command and Parameter\"].json[\"command\"]\nand parameter by: $node[\"Seperate command and Parameter\"].json[\"rest\"]\n1. based on your result you will reply back to Telegram by relevant message"
},
"typeVersion": 1
},
{
"id": "52b5bcbc-75a8-4aba-9686-1b1d7cfb02f2",
"name": "Command not found",
"type": "n8n-nodes-base.telegram",
"position": [
640,
-464
],
"webhookId": "7eef257a-b05d-4b1c-a653-ab7705005f4a",
"parameters": {
"text": "=Error: Command is not valid!\n\n{{ $('Valid Commands').first().json.validCommands }}\n\n----\nCommand:{{ $node[\"Seperate command and Parameter\"].json[\"command\"] }}\nParameter: {{ $node[\"Seperate command and Parameter\"].json[\"rest\"] }}\n",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "663ebfab-5033-4483-a6e4-ab6d38be4413",
"name": "Access Denied",
"type": "n8n-nodes-base.telegram",
"position": [
-16,
-496
],
"webhookId": "2fd699ad-d69c-495f-b1a8-ca6783835a3d",
"parameters": {
"text": "=You don't have permission to use this bot!\nContact the administrator to obtain permission access.\n\nAccount ID:{{ $json.message.from.id }}",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "86c74341-8166-48bd-8e86-d4a694fe7ed4",
"name": "Access Control",
"type": "n8n-nodes-base.if",
"position": [
-16,
-768
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6139880f-ae4a-43a0-836d-a1638795662d",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.message.from.id.toString() }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "317f4da6-707f-48c3-910a-4e50693b636a",
"name": "Seperate command and Parameter",
"type": "n8n-nodes-base.code",
"position": [
448,
-784
],
"parameters": {
"jsCode": "const input = $('Telegram Trigger').first().json.message.text\nlet command, rest;\n\nif (input.startsWith('/')) {\n const splitIndex = input.indexOf(' ');\n if (splitIndex === -1) {\n // No space found, entire input is the command\n command = input;\n rest = \"\";\n } else {\n command = input.substring(0, splitIndex);\n rest = input.substring(splitIndex + 1);\n }\n} else {\n command = \"\";\n rest = input;\n}\n\nreturn [{\n json: {\n command: command,\n rest: rest\n }\n}];\n"
},
"typeVersion": 2
},
{
"id": "a9a338a4-2814-422c-b529-1d74edb1ecef",
"name": "메모3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
-864
],
"parameters": {
"color": 3,
"width": 224,
"height": 80,
"content": "1.Add Account ID here enable access for the user"
},
"typeVersion": 1
},
{
"id": "1f9f977c-3c06-404f-8c72-347afbd5255a",
"name": "Valid Commands",
"type": "n8n-nodes-base.set",
"position": [
240,
-784
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "4a5ded62-ca69-44fa-bce4-00ed3bf41ade",
"name": "validCommands",
"type": "string",
"value": "Valid Commands:\n /list (list all available commands)\n /instagram (generate instagram post - parameter: quote (optional))\n /social (check social media for the stock ticker - parameter: stock ticker)\n /sentiment: (do sentiment analysis for the stock ticker - parameter: stock ticker)\n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9aa0c015-27a3-4911-8c2e-3d863c031171",
"name": "스위치 to the Command",
"type": "n8n-nodes-base.switch",
"position": [
640,
-832
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "sentiment",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "eb82524d-1fcd-4a19-a816-055de5c92e2e",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.command }}",
"rightValue": "/sentiment"
}
]
},
"renameOutput": true
},
{
"outputKey": "instagram",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "30940d5e-bdf9-471e-9684-b66244db9112",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.command }}",
"rightValue": "/instagram"
}
]
},
"renameOutput": true
},
{
"outputKey": "list",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7f424524-1eee-4d02-9c9b-6c5be91defbe",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.command }}",
"rightValue": "/list"
}
]
},
"renameOutput": true
},
{
"outputKey": "social",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7c466b2b-7759-493b-9a2f-8965e3d7224c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.command }}",
"rightValue": "/social"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.2
},
{
"id": "91779d6a-b7ac-4d77-8211-0528614147c9",
"name": "Social Analysis",
"type": "n8n-nodes-base.executeWorkflow",
"disabled": true,
"position": [
1248,
-384
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "="
},
"workflowInputs": {
"value": {
"ticker": "={{ $json.rest }}"
},
"schema": [
{
"id": "ticker",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ticker",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ticker"
],
"attemptToConvertTypes": false,
"convertFieldsToString": true
}
},
"typeVersion": 1.2
},
{
"id": "0f762bb5-6a18-42eb-8528-ab39bbde3686",
"name": "Social Analysis Output",
"type": "n8n-nodes-base.telegram",
"position": [
1680,
-384
],
"webhookId": "0a425c4d-1693-4fc6-b1de-cba1d741d62d",
"parameters": {
"text": "=Symbol: {{ $json.symbol }}\n\nSentiment Score: {{ $json.sentiment_score }}\n\nRational: {{ $json.rationale }}\n---\nCommand:{{ $node[\"Seperate command and Parameter\"].json[\"command\"] }}\nParameter: {{ $node[\"Seperate command and Parameter\"].json[\"rest\"] }}\n",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "aa73de3b-23e0-4f78-8cc6-3e79bd836294",
"name": "sentimental_analysis",
"type": "n8n-nodes-base.executeWorkflow",
"disabled": true,
"position": [
1248,
-1040
],
"parameters": {
"options": {},
"workflowId": {
"__rl": true,
"mode": "id",
"value": ""
}
},
"typeVersion": 1.2
},
{
"id": "06fa30d0-7d38-41da-9edd-1c685ef8cc97",
"name": "Generic Output1",
"type": "n8n-nodes-base.telegram",
"position": [
1680,
-592
],
"webhookId": "9d8bc712-a61a-4508-a7c3-3c6ba6d723ab",
"parameters": {
"text": "={{ $('Valid Commands').first().json.validCommands }}\n\n---\nCommand:{{ $node[\"Seperate command and Parameter\"].json[\"command\"] }}\nParameter: {{ $node[\"Seperate command and Parameter\"].json[\"rest\"] }}\n",
"chatId": "={{ $node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"id\"] }}\n",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "rftJijuNnjbeZjEv",
"name": "Telegram account - AmirStockBot"
}
},
"typeVersion": 1.2
},
{
"id": "541b48b2-1b86-4535-858c-5d4de3bde7ab",
"name": "메모4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
-1136
],
"parameters": {
"width": 624,
"height": 848,
"content": "# Telegram Command Center\n\n## ℹ️ What is this workflow\nThis workflow is using Telegram chat as a command center. Simple interface for user to run wokflows and receive answers by Telgram message or other mediums like email etc.\n\n## 💼 Business Cases\n- User want to initiate a wokflows by different commands\n\n## ⚙️ How Does It Work\n1. wokflow listen to telgram command from user\n1. check if user has authorize and proceed, or send access denied message with uer Account ID. Account ID can use for authorize user in the workflow\n1. Route to the relevant workflow based on command. If command doesnt exist, it will return with the list of commands\n1. If command valid, it will call the Sub-workflow with input parameter and reply back with the relevant message.\n\n## 🔗 Integrated Services\n- Telegram bot API key\n- Sub-Workflow for the command\n\n## 🛠 How to Set Up\n1. Install the workflow template. \n2. Configure Telegram credential\n3. Update Access Control by Authorize Account ID\n4. Update Valie Commands\n5. Update List of command to switch\n6. Connect to right SUbworkflows\n7. Update/Select Telgram reply"
},
"typeVersion": 1
},
{
"id": "e4c26f0f-deac-4f71-958a-15a4d44dc02e",
"name": "메모5",
"type": "n8n-nodes-base.stickyNote",
"position": [
224,
-624
],
"parameters": {
"color": 3,
"width": 224,
"height": 80,
"content": "2.Update you available command here"
},
"typeVersion": 1
},
{
"id": "5fb4ea46-0f49-4b7f-be52-c7323a556337",
"name": "메모6",
"type": "n8n-nodes-base.stickyNote",
"position": [
608,
-928
],
"parameters": {
"color": 3,
"width": 224,
"height": 80,
"content": "3.Update list of commands here"
},
"typeVersion": 1
},
{
"id": "911c5ead-a29b-4c72-8f40-e12ab10ce3f4",
"name": "메모7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
-624
],
"parameters": {
"color": 3,
"width": 224,
"height": 80,
"content": "4.Connect to relevant Sub-Wokflow and use message to reply back"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1"
},
"versionId": "9b90b18a-1fa1-4104-b613-46c69ace0f04",
"connections": {
"86c74341-8166-48bd-8e86-d4a694fe7ed4": {
"main": [
[
{
"node": "1f9f977c-3c06-404f-8c72-347afbd5255a",
"type": "main",
"index": 0
}
],
[
{
"node": "663ebfab-5033-4483-a6e4-ab6d38be4413",
"type": "main",
"index": 0
}
]
]
},
"2ddf08dd-759d-4dad-81fd-4e7fad69a628": {
"main": [
[
{
"node": "c2d15090-96f3-46f3-a39a-3d6b880feeaa",
"type": "main",
"index": 0
}
]
]
},
"1f9f977c-3c06-404f-8c72-347afbd5255a": {
"main": [
[
{
"node": "317f4da6-707f-48c3-910a-4e50693b636a",
"type": "main",
"index": 0
}
]
]
},
"91779d6a-b7ac-4d77-8211-0528614147c9": {
"main": [
[
{
"node": "5c258bb2-3ba3-44cf-bad0-7ed9c83754e0",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "86c74341-8166-48bd-8e86-d4a694fe7ed4",
"type": "main",
"index": 0
}
]
]
},
"aa73de3b-23e0-4f78-8cc6-3e79bd836294": {
"main": [
[
{
"node": "10b63b94-03f5-4728-9d9d-36b333eaa1fa",
"type": "main",
"index": 0
}
]
]
},
"Switch to the Command": {
"main": [
[
{
"node": "aa73de3b-23e0-4f78-8cc6-3e79bd836294",
"type": "main",
"index": 0
}
],
[
{
"node": "2ddf08dd-759d-4dad-81fd-4e7fad69a628",
"type": "main",
"index": 0
}
],
[
{
"node": "06fa30d0-7d38-41da-9edd-1c685ef8cc97",
"type": "main",
"index": 0
}
],
[
{
"node": "91779d6a-b7ac-4d77-8211-0528614147c9",
"type": "main",
"index": 0
}
],
[
{
"node": "52b5bcbc-75a8-4aba-9686-1b1d7cfb02f2",
"type": "main",
"index": 0
}
]
]
},
"5c258bb2-3ba3-44cf-bad0-7ed9c83754e0": {
"main": [
[
{
"node": "0f762bb5-6a18-42eb-8528-ab39bbde3686",
"type": "main",
"index": 0
}
]
]
},
"10b63b94-03f5-4728-9d9d-36b333eaa1fa": {
"main": [
[]
]
},
"317f4da6-707f-48c3-910a-4e50693b636a": {
"main": [
[
{
"node": "Switch to the Command",
"type": "main",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 지원 챗봇, AI 챗봇
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
J.A.R.V.I.S.
사용법 Telegram에서 OpenAI, SERP 및 벡터 스토리지를 사용하여 전면적인 다중 모달 도우미 구축
If
Set
Code
+
If
Set
Code
48 노드FabioInTech
지원 챗봇
Telegram 지원 인계 자동화
GPT4 및 이메일 알림을 사용한 Telegram 지원 AI-인간 전환 자동화
If
Set
Switch
+
If
Set
Switch
40 노드Meelioo
지원 챗봇
带有 Chatgpt Agent Prompt 检查의信用卡
AI驱动信用卡推荐系统,통합OpenAI GPT、Telegram및Google Sheets
If
Set
Code
+
If
Set
Code
31 노드Nishant
AI 챗봇
Gemini, 음성, 이미지 생성을 사용하여 다중 모달 Telegram AI 어시스턴트를 구축합니다.
Gemini, 음성, 이미지 생성을 사용하여 다중 모달 Telegram AI 어시스턴트를 구축합니다.
If
Set
Code
+
If
Set
Code
95 노드Iniyavan JC
개인 생산성
演示 이메일 공유
AI, Telegram 로봇 및 웹 크롤링을 사용하여 개인화된 이메일 외부 연락 생성
If
Set
Xml
+
If
Set
Xml
58 노드Michael A Putra
리드 육성
Telegram AI 지원 채팅 로봇(다모드 입력)
GPT-4와 Supabase RAG을 사용하여 다중 모달 Telegram 지원 로봇을 생성합니다.
If
Set
Code
+
If
Set
Code
51 노드Ezema Kingsley Chibuzo
지원 챗봇
워크플로우 정보
난이도
고급
노드 수23
카테고리2
노드 유형8
저자
Amir
@amandegarPassionate AI Automation, Visualization and Data Fabric Consultant | Helping to Shape the Future of Business through Innovation
외부 링크
n8n.io에서 보기 →
이 워크플로우 공유