{ "name": "Daily Affirmation to Telegram", "nodes": [ { "name": "Cron", "type": "n8n-nodes-base.cron", "position": [ 350, 380 ], "parameters": { "triggerTimes": { "item": [ { "mode": "everyDay", "hour": 9 } ] } }, "typeVersion": 1, "id": "daily-affirmation-to-telegram-0" }, { "name": "HTTP Request", "type": "n8n-nodes-base.httpRequest", "position": [ 760, 380 ], "parameters": { "url": "https://affirmations.dev", "options": {} }, "typeVersion": 1, "id": "daily-affirmation-to-telegram-1" }, { "name": "Telegram", "type": "n8n-nodes-base.telegram", "position": [ 1140, 380 ], "parameters": { "text": "={{ $json.text }}", "additionalFields": {}, "chatId": "YOUR_TELEGRAM_CHAT_ID" }, "typeVersion": 1, "id": "daily-affirmation-to-telegram-2" }, { "id": "daily-affirmation-to-telegram-check", "name": "Check the affirmation", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 950, 380 ], "parameters": { "mode": "runOnceForEachItem", "jsCode": "const value = $json.affirmation;\nif (typeof value !== 'string' || !value.trim()) throw new Error('Affirmation response must include a non-empty affirmation string');\nconst text = \"Here's your daily affirmation...\\n\\n\" + value.trim();\nif (text.length > 4096) throw new Error('Telegram message exceeds 4096 characters');\nreturn { json: { text } };" } } ], "active": false, "settings": { "timezone": "UTC" }, "connections": { "Cron": { "main": [ [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] }, "HTTP Request": { "main": [ [ { "node": "Check the affirmation", "type": "main", "index": 0 } ] ] }, "Check the affirmation": { "main": [ [ { "node": "Telegram", "type": "main", "index": 0 } ] ] } }, "pinData": {} }