텔레그램 로봇
중급
이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 15개의 노드를 포함합니다.주로 Set, Switch, Telegram, Agent, TelegramTrigger 등의 노드를 사용하며. 텔레그램 로봇을 구축하여 텍스트와 이미지 응답 지원, Google Gemini 2.5 Flash 통합
사전 요구사항
- •Telegram Bot Token
- •Google Gemini API Key
사용된 노드 (15)
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
"id": "pl3YbOUdHMsDTYFE",
"meta": {
"instanceId": "f21041c58ebe9ae27fd386689e649a871f62f45682ca1c57f2ff2f2e3c9a5999"
},
"name": "TelegramBOT",
"tags": [],
"nodes": [
{
"id": "sticky-note-main",
"name": "스티키 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1100,
-300
],
"parameters": {
"color": 4,
"width": 460,
"height": 640,
"content": "## 📋 TELEGRAM AI BOT - SETUP GUIDE\n\n### 🎯 What This Workflow Does:\nThis is an intelligent Telegram bot that can:\n- Answer text messages using AI\n- Analyze images sent by users\n- Maintain conversation context/memory\n- Provide formatted, attractive responses\n\n### 🔧 Required Setup:\n\n**1. Telegram Bot Token:**\n - Create a bot via @BotFather on Telegram\n - Get your bot token\n - Add credentials in n8n (Telegram account)\n\n**2. Google Gemini API Key:**\n - Go to Google AI Studio (ai.google.dev)\n - Create API key\n - Add credentials in n8n (Google Gemini API account)\n\n**3. Webhook Configuration:**\n - Activate the workflow\n - The webhook URL will be automatically set\n\n### 📊 Workflow Flow:\n1. **Telegram Trigger** receives messages\n2. **Route Types** checks if message is text or image\n3. For text: Direct to AI agent\n4. For images: Download → Analyze → Send to AI agent\n5. **AI Agent** processes with memory context\n6. Response sent back to user\n\n### ⚠️ Important Notes:\n- Memory is per message ID (20 message context)\n- Image analysis uses Gemini 2.5 Flash\n- Responses are formatted for Telegram readability"
},
"typeVersion": 1
},
{
"id": "sticky-note-trigger",
"name": "스티키 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-820,
-80
],
"parameters": {
"color": 5,
"width": 280,
"height": 160,
"content": "## 🚀 TRIGGER\nStarts when user sends a message to your Telegram bot.\n\nCaptures both text messages and images."
},
"typeVersion": 1
},
{
"id": "sticky-note-router",
"name": "스티키 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-600,
-80
],
"parameters": {
"color": 6,
"width": 260,
"height": 140,
"content": "## 🔀 ROUTING\nChecks message type:\n- TEXT: Route to text mapper\n- IMAGE: Route to image handler"
},
"typeVersion": 1
},
{
"id": "sticky-note-image",
"name": "스티키 노트3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-380,
160
],
"parameters": {
"color": 3,
"width": 360,
"height": 380,
"content": "## 🖼️ IMAGE PROCESSING\n1. Download image from Telegram\n2. Analyze with Gemini Vision\n3. Combine description + caption"
},
"typeVersion": 1
},
{
"id": "sticky-note-agent",
"name": "스티키 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-80
],
"parameters": {
"color": 2,
"width": 300,
"height": 180,
"content": "## 🤖 AI AGENT\nGoogle Gemini processes the request with:\n- Conversation memory (20 messages)\n- Context-aware responses\n- Telegram-friendly formatting"
},
"typeVersion": 1
},
{
"id": "568a5011-79b3-4660-88d9-c8b4c7c4519d",
"name": "지식 베이스 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
352,
64
],
"parameters": {
"text": "=Use these Descriptions to reply with a message to the user according to his question simply, shortly, and make sure he understand the thing he attaches:\n\n\"\" {{ $json.text }} \"\"\n\n\nI need your output message to be well spaced and formatted and look as attractive as possible for a telegram response!",
"options": {
"systemMessage": ""
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "0c3f40bf-3773-4f7b-8b88-404e872d1188",
"name": "심플 메모리",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
400,
464
],
"parameters": {
"sessionKey": "=memory_{{ $('Telegram Trigger').item.json.message.message_id }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "74a1218b-fb53-450c-8462-ccad268ad7ee",
"name": "이미지 프롬프트 매핑",
"type": "n8n-nodes-base.set",
"position": [
128,
272
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "48af2dcc-4ce9-45fc-abfc-54f803930092",
"name": "text",
"type": "string",
"value": "=User image description:\n\n{{ $json.content.parts[0].text }}\n\nUser image caption: {{ $('Telegram Trigger').item.json.message.caption }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "85b4e665-2468-40c1-aa99-bd67e048d9fb",
"name": "텍스트 프롬프트 매핑",
"type": "n8n-nodes-base.set",
"position": [
-96,
-208
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "38aec976-a32c-4b0e-85f4-c90adc16abc9",
"name": "text",
"type": "string",
"value": "={{ $json.messages[0].text.body }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "482edd25-6a05-45cd-bb1f-c11d451938f5",
"name": "라우팅 유형",
"type": "n8n-nodes-base.switch",
"position": [
-544,
64
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2fc5c912-629b-4cbe-b5e3-7e3f0651c628",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": "text"
}
]
},
"renameOutput": true
},
{
"outputKey": "Image",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "840b95b8-6559-4fb7-b32c-651451d6d0d2",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.photo[2] }}",
"rightValue": "image"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "5cf1706c-cd33-4def-a99d-958d51654088",
"name": "Google Gemini 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
240,
464
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "dBVkcKvaggEaTZ3w",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "46fd3fa6-5261-4fcf-b148-52a7ce0b2c43",
"name": "이미지 분석",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
-96,
272
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "image",
"inputType": "binary",
"operation": "analyze"
},
"credentials": {
"googlePalmApi": {
"id": "dBVkcKvaggEaTZ3w",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "5b5f176c-7d2d-4db2-9f55-cc4dc18f6d4a",
"name": "Telegram 트리거",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-768,
64
],
"webhookId": "049da2eb-7ce1-4efd-820f-6a700adea8b6",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"typeVersion": 1.2,
"alwaysOutputData": false
},
{
"id": "6489c29a-2c59-4362-916a-605f3e63c866",
"name": "파일 가져오기",
"type": "n8n-nodes-base.telegram",
"position": [
-320,
272
],
"webhookId": "d1b193c3-236e-4bed-be47-d0e156960d35",
"parameters": {
"fileId": "={{ $json.message.photo[2].file_id }}",
"resource": "file",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "Q0bwwwn2wzmbamLh",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "7b1b528f-4e3e-48d3-bc33-638fa4a3f446",
"name": "텍스트 메시지 전송",
"type": "n8n-nodes-base.telegram",
"position": [
704,
64
],
"webhookId": "53b5dc25-a9ea-47b4-87b7-274984c1115d",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "Q0bwwwn2wzmbamLh",
"name": "Telegram account"
}
},
"typeVersion": 1.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "332b36b7-0523-4d91-9ec6-0cb0b948d7f2",
"connections": {
"6489c29a-2c59-4362-916a-605f3e63c866": {
"main": [
[
{
"node": "46fd3fa6-5261-4fcf-b148-52a7ce0b2c43",
"type": "main",
"index": 0
}
]
]
},
"482edd25-6a05-45cd-bb1f-c11d451938f5": {
"main": [
[
{
"node": "85b4e665-2468-40c1-aa99-bd67e048d9fb",
"type": "main",
"index": 0
}
],
[
{
"node": "6489c29a-2c59-4362-916a-605f3e63c866",
"type": "main",
"index": 0
}
]
]
},
"46fd3fa6-5261-4fcf-b148-52a7ce0b2c43": {
"main": [
[
{
"node": "74a1218b-fb53-450c-8462-ccad268ad7ee",
"type": "main",
"index": 0
}
]
]
},
"0c3f40bf-3773-4f7b-8b88-404e872d1188": {
"ai_memory": [
[
{
"node": "568a5011-79b3-4660-88d9-c8b4c7c4519d",
"type": "ai_memory",
"index": 0
}
]
]
},
"85b4e665-2468-40c1-aa99-bd67e048d9fb": {
"main": [
[
{
"node": "568a5011-79b3-4660-88d9-c8b4c7c4519d",
"type": "main",
"index": 0
}
]
]
},
"74a1218b-fb53-450c-8462-ccad268ad7ee": {
"main": [
[
{
"node": "568a5011-79b3-4660-88d9-c8b4c7c4519d",
"type": "main",
"index": 0
}
]
]
},
"5b5f176c-7d2d-4db2-9f55-cc4dc18f6d4a": {
"main": [
[
{
"node": "482edd25-6a05-45cd-bb1f-c11d451938f5",
"type": "main",
"index": 0
}
]
]
},
"568a5011-79b3-4660-88d9-c8b4c7c4519d": {
"main": [
[
{
"node": "7b1b528f-4e3e-48d3-bc33-638fa4a3f446",
"type": "main",
"index": 0
}
]
]
},
"5cf1706c-cd33-4def-a99d-958d51654088": {
"ai_languageModel": [
[
{
"node": "568a5011-79b3-4660-88d9-c8b4c7c4519d",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}자주 묻는 질문
이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 콘텐츠 제작, 멀티모달 AI
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
저의 워크플로우
칼로리 추적과 식사 기록(Telegram, Gemini AI, 데이터 시트)
If
Set
Code
+
If
Set
Code
73 노드Gerald Denor
콘텐츠 제작
AI 기반 잠재 고객 스크래핑 (APIFY 크롤러, Gemini 필터링, Google Sheets 출력)
AI 기반 잠재 고객 처리: Apify에서 Gemini와 Google Sheets 활용
Wait
Telegram
Http Request
+
Wait
Telegram
Http Request
19 노드Ahmed Sherif
콘텐츠 제작
성분 분석
Telegram 및 Gemini 2.5 Flash를 사용하여 제품 성분 사진 분석
If
Switch
Telegram
+
If
Switch
Telegram
17 노드Parth Pansuriya
콘텐츠 제작
LinkedIn 및 X 바이럴 콘텐츠 자동 엔진
사용AI생성및게시자동생성LinkedIn및X의病毒콘텐츠
If
Set
Wait
+
If
Set
Wait
156 노드Diptamoy Barman
콘텐츠 제작
완전한 B2B 판매 프로세스: Apollo 잠재 고객 생성, Mailgun 프로모션 및 AI 응답 관리
완전한 B2B 판매 프로세스: Apollo 잠재 고객 생성, Mailgun 확장 및 AI 응답 관리
If
Set
Code
+
If
Set
Code
116 노드Paul
콘텐츠 제작
AI 마케팅 팀
Telegram에서 GPT-4와 AI 도구를 통해 음성 명령으로 마케팅 내용 생성
Set
Switch
Telegram
+
Set
Switch
Telegram
25 노드Muhammad Ashar
콘텐츠 제작