{ "nodes": [ { "id": "analyze-telegram-images-with-ai-0", "name": "Get the Image", "type": "n8n-nodes-base.telegramTrigger", "position": [ 1640, 880 ], "parameters": { "updates": [ "message" ], "additionalFields": { "download": true } }, "typeVersion": 1.1 }, { "id": "analyze-telegram-images-with-ai-1", "name": "Send Content for the Analyzed image", "type": "n8n-nodes-base.telegram", "position": [ 2380, 760 ], "parameters": { "text": "={{ $json.content }}", "chatId": "={{ $('Get the Image').item.json.message.chat.id }}", "additionalFields": { "appendAttribution": false } }, "typeVersion": 1.1 }, { "id": "analyze-telegram-images-with-ai-2", "name": "Update Telegram Error Message", "type": "n8n-nodes-base.telegram", "position": [ 2380, 1000 ], "parameters": { "text": "Please Upload an Image ....", "chatId": "={{ $json.message.chat.id }}", "additionalFields": { "appendAttribution": false } }, "typeVersion": 1.1 }, { "id": "analyze-telegram-images-with-ai-3", "name": "Wait", "type": "n8n-nodes-base.wait", "position": [ 2180, 1000 ], "parameters": { "amount": 3, "unit": "hours" }, "typeVersion": 1.1 }, { "id": "analyze-telegram-images-with-ai-4", "name": "Analyze image", "type": "@n8n/n8n-nodes-langchain.openAi", "position": [ 2180, 760 ], "parameters": { "options": { "maxTokens": 300 }, "resource": "image", "inputType": "base64", "operation": "analyze", "modelId": { "__rl": true, "mode": "list", "value": "gpt-4.1-mini" }, "text": "What's in this image?" }, "typeVersion": 1.8 }, { "id": "analyze-telegram-images-with-ai-5", "name": "Switch ( image or not )", "type": "n8n-nodes-base.switch", "position": [ 1820, 880 ], "parameters": { "rules": { "values": [ { "outputKey": "Image", "conditions": { "options": { "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "operator": { "type": "array", "operation": "exists", "singleValue": true }, "leftValue": "={{ $json.message.photo }}", "rightValue": "" } ] }, "renameOutput": true }, { "outputKey": "Empty", "conditions": { "options": { "leftValue": "", "caseSensitive": true, "typeValidation": "strict" }, "combinator": "and", "conditions": [ { "id": "3fe3a96d-6ee9-4f12-a32c-f5f5b729e257", "operator": { "type": "array", "operation": "notExists", "singleValue": true }, "leftValue": "={{ $json.message.photo }}", "rightValue": "" } ] }, "renameOutput": true } ] }, "options": {} }, "typeVersion": 3 } ], "pinData": {}, "connections": { "Wait": { "main": [ [ { "node": "Update Telegram Error Message", "type": "main", "index": 0 } ] ] }, "Analyze image": { "main": [ [ { "node": "Send Content for the Analyzed image", "type": "main", "index": 0 } ] ] }, "Get the Image": { "main": [ [ { "node": "Switch ( image or not )", "type": "main", "index": 0 } ] ] }, "Switch ( image or not )": { "main": [ [ { "node": "Analyze image", "type": "main", "index": 0 } ], [ { "node": "Wait", "type": "main", "index": 0 } ] ] } }, "name": "Analyze Telegram Images with AI", "active": false }