Files
unraid-docker-manager/n8n-workflow.json
T
Lucas Berger 23c5705050 fix(01-01): hardcode user ID instead of env var
n8n community edition blocks env var access in expressions.
Hardcoded TELEGRAM_USER_ID for single-user authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:25:33 -05:00

127 lines
2.9 KiB
JSON

{
"name": "Docker Manager Bot",
"nodes": [
{
"parameters": {
"updates": ["message"]
},
"id": "telegram-trigger",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.1,
"position": [240, 300],
"credentials": {
"telegramApi": {
"id": "telegram-credential",
"name": "Telegram API"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "user-auth-condition",
"leftValue": "={{ $json.message.from.id.toString() }}",
"rightValue": "563878771",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "if-auth",
"name": "IF User Authenticated",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [460, 300]
},
{
"parameters": {
"jsCode": "const message = $input.item.json.message;\nconst timestamp = new Date().toISOString();\nconst text = message.text || '(no text)';\n\nreturn {\n json: {\n chatId: message.chat.id,\n text: `Got: ${text}\\n\\nProcessed: ${timestamp}`\n }\n};"
},
"id": "code-format-echo",
"name": "Format Echo",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [680, 240]
},
{
"parameters": {
"resource": "message",
"operation": "sendMessage",
"chatId": "={{ $json.chatId }}",
"text": "={{ $json.text }}",
"additionalFields": {
"parse_mode": "HTML"
}
},
"id": "telegram-send",
"name": "Send Echo",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [900, 240],
"credentials": {
"telegramApi": {
"id": "telegram-credential",
"name": "Telegram API"
}
}
}
],
"connections": {
"Telegram Trigger": {
"main": [
[
{
"node": "IF User Authenticated",
"type": "main",
"index": 0
}
]
]
},
"IF User Authenticated": {
"main": [
[
{
"node": "Format Echo",
"type": "main",
"index": 0
}
],
[]
]
},
"Format Echo": {
"main": [
[
{
"node": "Send Echo",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 1,
"active": false
}