Mit GPT-5 in Telegram chatten: KI-gesteuerter Chatbot
Fortgeschritten
Dies ist ein AI Chatbot, Multimodal AI-Bereich Automatisierungsworkflow mit 14 Nodes. Hauptsächlich werden Telegram, AimlApi, GoogleSheets, TelegramTrigger und andere Nodes verwendet. Auf Telegram mit GPT-5 chatten: KI-gesteuerter Conversational Bot
Voraussetzungen
- •Telegram Bot Token
- •Google Sheets API-Anmeldedaten
Verwendete Nodes (14)
Kategorie
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
"meta": {
"instanceId": "355b2d103ad4834400263e78c73e64bbdb709c896780479c01a9ab9ccd7df6cf",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "368c3442-b61b-4e35-9de0-f7ef3f52aa0f",
"name": "📩 Receive Telegram Message",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
1072,
1968
],
"webhookId": "3ceea664-fd53-4141-8bc6-4fdaca0a661d",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "cFC7gGbzU7PQGk6J",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "fe8f2304-f2f6-45d5-8f26-3e07f59f2122",
"name": "Haftnotiz – Übersicht",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
304
],
"parameters": {
"color": 5,
"width": 560,
"height": 496,
"content": "# 💬 AI Chat Bot — Telegram + AIMLAPI (via n8n)\n\nThis workflow lets users chat with **GPT-5** directly in Telegram. Messages are processed and answered in real-time via **AIMLAPI**.\n\n---\n\n## 🚀 Features\n\n* Chat with GPT-5 using natural language\n* Context-aware conversation\n* Telegram delivery of responses\n* Easy to extend with logging or moderation"
},
"typeVersion": 1
},
{
"id": "1d3c2472-92fe-4d4e-b157-81de61882d0b",
"name": "Haftnotiz – Anpassung",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
816
],
"parameters": {
"color": 5,
"width": 560,
"height": 560,
"content": "## ⚙️ Customization\n\n* Change the `model` parameter to use other AI models (Claude, Gemini, etc.)\n* Add:\n * Message logging to Google Sheets or DB\n * NSFW filtering\n * Command handling (`/help`, `/reset`)\n\n---\n\n## 💡 Example User Flow\n\n1. User sends:\n ```\n What's the capital of Japan?\n ```\n2. Bot replies:\n > The capital of Japan is Tokyo.\n\n3. Chat continues naturally with context preserved"
},
"typeVersion": 1
},
{
"id": "fc3443dd-7c1d-478f-846b-e20b2d480898",
"name": "Haftnotiz – Einrichtungsanleitung",
"type": "n8n-nodes-base.stickyNote",
"position": [
1744,
448
],
"parameters": {
"color": 5,
"width": 560,
"height": 544,
"content": "# 🛠 Setup Guide\n\n### 1. 📲 Create a Telegram Bot\n* Go to [@BotFather](https://t.me/BotFather)\n* Use `/newbot`, set a name and username\n* Save the **API token**\n\n---\n### 2. 🔐 Connect Telegram API in n8n\n* Go to `Credentials > Telegram API`\n* Create new credentials using the token from BotFather\n\n---\n### 3. 🔌 Set Up AIMLAPI Credentials in n8n\n* Go to `Credentials > AI/ML API`\n* Enter your **API key**\n* Base URL: `https://api.aimlapi.com/v1`\n* Docs: [docs.aimlapi.com](https://docs.aimlapi.com)"
},
"typeVersion": 1
},
{
"id": "cdd88b85-4766-4e2c-9e5f-7b409963c443",
"name": "Haftnotiz – Protokollierung & Test",
"type": "n8n-nodes-base.stickyNote",
"position": [
1744,
1008
],
"parameters": {
"color": 5,
"width": 560,
"height": 432,
"content": "## 📁 Optional Data Logging\n\nYou can log every chat message to Google Sheets or a database for analytics:\n\n` | user_id | date | message | response | `\n` | ------- | ---- | ------- | -------- | `\n\n---\n## 🧪 Testing Tips\n\n* Use a test Telegram chat before production\n* Add `Console` or `Set` nodes to inspect payloads\n* For realistic tests, run via `/execute` from Telegram, **not** \"Execute Node\""
},
"typeVersion": 1
},
{
"id": "f6b40a2d-c83a-47aa-9046-23cdc601ef73",
"name": "📝 Log Successful Generation",
"type": "n8n-nodes-base.googleSheets",
"position": [
2784,
1968
],
"parameters": {
"columns": {
"value": {
"date": "={{ new Date().toISOString().split('T')[0] }}",
"query": "={{ $('📩 Receive Telegram Message').item.json.message.text }}",
"result": "={{ $('🧠 Process with GPT‑5').item.json.content }}",
"user_id": "={{ $json.result.from.id }}"
},
"schema": [
{
"id": "user_id",
"type": "string",
"display": true,
"required": false,
"displayName": "user_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "date",
"type": "string",
"display": true,
"required": false,
"displayName": "date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "query",
"type": "string",
"display": true,
"required": false,
"displayName": "query",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "result",
"type": "string",
"display": true,
"required": false,
"displayName": "result",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 2060422727,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k/edit#gid=2060422727",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19rsFwln4KMpGjOzxOdz7OC_-kRH8_qD4Agx5lXlDD9k/edit?usp=drivesdk",
"cachedResultName": "AI bot usage statistic"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "OaJ0A7gqb1dgxqB8",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "a00ee4eb-0c89-48a2-87c1-000197b71a55",
"name": "Haftnotiz – Nachricht empfangen",
"type": "n8n-nodes-base.stickyNote",
"position": [
944,
1552
],
"parameters": {
"color": 3,
"width": 384,
"height": 608,
"content": "# 📥 Step 1 — Receive Telegram Message\nListens for new messages sent to your Telegram bot.\n\nCaptures:\n* **chat.id** — used for sending responses back\n* **message.text** — the text provided by the user\n\n💡 You can restrict to specific commands/keywords if needed."
},
"typeVersion": 1
},
{
"id": "375019d6-a2c0-438c-950c-376603599dc5",
"name": "Haftnotiz – GPT‑5 Verarbeitung",
"type": "n8n-nodes-base.stickyNote",
"position": [
1744,
1552
],
"parameters": {
"width": 384,
"height": 608,
"content": "# 🧠 Step 2 — Process with GPT‑5\nSends the raw Telegram message text to **AI/ML API** using `openai/gpt-5-chat-latest`.\n\nPurpose:\n* Improve or expand the input text\n* Make it more descriptive/structured as needed\n\n⚙️ Configurable:\n* Change the model ID\n* Add system instructions to control style, tone, or length"
},
"typeVersion": 1
},
{
"id": "e58d2186-f12e-43a4-9b7c-a644d27e64fa",
"name": "Haftnotiz – Antwort senden",
"type": "n8n-nodes-base.stickyNote",
"position": [
2144,
1552
],
"parameters": {
"color": 4,
"width": 384,
"height": 608,
"content": "# 📤 Step 3 — Send Response to Telegram\nSends the model’s response back to the same user.\n\nIncludes:\n* **chat_id** — from the original message\n* **text/caption** — the result returned by GPT‑5\n\n💡 You can format text, add emojis, or customize the reply style here."
},
"typeVersion": 1
},
{
"id": "06a31bfb-15af-40fe-b468-057cf985180f",
"name": "Haftnotiz – Protokollierung",
"type": "n8n-nodes-base.stickyNote",
"position": [
2640,
1552
],
"parameters": {
"color": 5,
"width": 384,
"height": 608,
"content": "# 📝 Step 4 — Log Interaction (Optional)\nAppends a row to your sheet/database with:\n* **date** — ISO date\n* **user_id** — from Telegram\n* **query** — original message text\n* **result** — model output (text or link, depending on your setup)\n\nUse this for:\n* Usage tracking & quotas\n* Analytics and QA"
},
"typeVersion": 1
},
{
"id": "333a49e9-e553-4f95-87b9-d89548db6114",
"name": "🧠 Process with GPT‑5",
"type": "n8n-nodes-aimlapi.aimlApi",
"position": [
1888,
1968
],
"parameters": {
"model": "openai/gpt-5-chat-latest",
"prompt": "={{ $('📩 Receive Telegram Message').item.json.message.text }}",
"options": {},
"requestOptions": {}
},
"credentials": {
"aimlApi": {
"id": "EXXHjMACiSMAhuC8",
"name": "AI/ML account"
}
},
"retryOnFail": false,
"typeVersion": 1,
"alwaysOutputData": false
},
{
"id": "960ea33b-3c1a-4ad1-a330-18aab8bc030a",
"name": "📤 Send Response to Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
2288,
1968
],
"webhookId": "4a46da0a-9a91-4f31-802a-f0ce89516aa7",
"parameters": {
"text": "={{ $json.content }}",
"chatId": "={{ $('📩 Receive Telegram Message').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false,
"reply_to_message_id": "={{ $('📩 Receive Telegram Message').item.json.message.message_id }}"
}
},
"credentials": {
"telegramApi": {
"id": "cFC7gGbzU7PQGk6J",
"name": "Telegram account"
}
},
"typeVersion": 1.2
},
{
"id": "7cc29371-2e04-440c-baea-4f7a716a5acf",
"name": "Haftnotiz – Receive Message1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1344,
1552
],
"parameters": {
"color": 3,
"width": 384,
"height": 608,
"content": "# 💬 Step 1.5 — Simulate Typing in Telegram\n\n\nSends a \"typing…\" chat action to the user in Telegram before delivering the actual \nresponse. \n\nThis creates a more natural conversational experience by letting the user know the bot is processing their message. \n\nUseful for longer AI processing times or when generating detailed responses."
},
"typeVersion": 1
},
{
"id": "3e50eeda-e420-48fe-b136-1191d679f422",
"name": "💬 Simulate Typing in Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
1488,
1968
],
"webhookId": "d275c6c6-00c3-4ccd-9e29-48c99574d7b2",
"parameters": {
"chatId": "={{ $json.message.chat.id }}",
"operation": "sendChatAction"
},
"credentials": {
"telegramApi": {
"id": "cFC7gGbzU7PQGk6J",
"name": "Telegram account"
}
},
"typeVersion": 1.2
}
],
"pinData": {},
"connections": {
"333a49e9-e553-4f95-87b9-d89548db6114": {
"main": [
[
{
"node": "960ea33b-3c1a-4ad1-a330-18aab8bc030a",
"type": "main",
"index": 0
}
]
]
},
"368c3442-b61b-4e35-9de0-f7ef3f52aa0f": {
"main": [
[
{
"node": "3e50eeda-e420-48fe-b136-1191d679f422",
"type": "main",
"index": 0
}
]
]
},
"960ea33b-3c1a-4ad1-a330-18aab8bc030a": {
"main": [
[
{
"node": "f6b40a2d-c83a-47aa-9046-23cdc601ef73",
"type": "main",
"index": 0
}
]
]
},
"3e50eeda-e420-48fe-b136-1191d679f422": {
"main": [
[
{
"node": "333a49e9-e553-4f95-87b9-d89548db6114",
"type": "main",
"index": 0
}
]
]
}
}
}Häufig gestellte Fragen
Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - KI-Chatbot, Multimodales KI
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Einen multimodalen KI-Chatbot mit Telegram, AIMLAPI und Google Tabellen erstellen
Erstellen Sie einen multimodalen KI-Chatbot mit Telegram, AIMLAPI und Google Tabellen
If
Set
Code
+
If
Set
Code
25 NodesAI/ML API | D1m7asis
Persönliche Produktivität
AI-Bilder in Telegram mit GPT-4o und Flux Pro verbessern und generieren
Mit GPT-4o und Flux Pro in Telegram KI-Bilder erstellen und verbessern
If
Set
Telegram
+
If
Set
Telegram
22 NodesAI/ML API | D1m7asis
Content-Erstellung
Telegram-Gesundheitspsychologie-Unterstützungsbot basierend auf GPT-4o bauen
Telegram-Mentalgesundheit-Unterstützungs-Bot basierend auf GPT-4o bauen
Set
Switch
Telegram
+
Set
Switch
Telegram
15 NodesAI/ML API | D1m7asis
Support-Chatbot
Interaktiver Russisch-Tutor-Bot basierend auf GPT-4o und Telegram
Interaktiver russischer Tutoren-Bot basierend auf GPT-4o und Telegram
Set
Switch
Telegram
+
Set
Switch
Telegram
16 NodesAI/ML API | D1m7asis
Content-Erstellung
AI-Powered Credit Card Recommendation System with OpenAI GPT, Telegram & Google Sheets
If
Set
Code
+
If
Set
Code
31 NodesNishant
KI-Chatbot
GPT-4o Vision mit Telegram-Bildanalyse und Textextraktion
Verwendung von GPT-4o Vision und Telegram zur Analyse von Bildern und zum Extrahieren von Text
Code
Telegram
Http Request
+
Code
Telegram
Http Request
16 NodesAI/ML API | D1m7asis
Dokumentenextraktion
Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes14
Kategorie2
Node-Typen5
Autor
AI/ML API | D1m7asis
@d1m7asisExterne Links
Auf n8n.io ansehen →
Diesen Workflow teilen