{
  "openruna_format": "flow-graph-v1",
  "title": "🤖 Telegram Messaging Agent for Text/Audio/Images",
  "slug": "telegram-messaging-agent-for-textaudioimages",
  "source_filename": "1182_Telegram_Webhook_Automation_Webhook.json",
  "nodes": [
    {
      "id": "Check User & Chat ID",
      "name": "Check User & Chat ID",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Error message",
      "name": "Error message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Listen for Telegram Events",
      "name": "Listen for Telegram Events",
      "integration": "webhook",
      "kind": "trigger"
    },
    {
      "id": "Set Webhook Test URL",
      "name": "Set Webhook Test URL",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Get Telegram Webhook Info",
      "name": "Get Telegram Webhook Info",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Image Schema",
      "name": "Image Schema",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "gpt-4o-mini",
      "name": "gpt-4o-mini",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Get Audio File",
      "name": "Get Audio File",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Get Image",
      "name": "Get Image",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Analyze Image",
      "name": "Analyze Image",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "Transcribe Recording",
      "name": "Transcribe Recording",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "gpt-4o-mini1",
      "name": "gpt-4o-mini1",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Test Webhook Status",
      "name": "Test Webhook Status",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Production Webhook Status",
      "name": "Production Webhook Status",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Set Webhook Production URL",
      "name": "Set Webhook Production URL",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Edit Fields",
      "name": "Edit Fields",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Audio Task Message",
      "name": "Audio Task Message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Audio Other Message",
      "name": "Audio Other Message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Text Task Message",
      "name": "Text Task Message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Text Other Message",
      "name": "Text Other Message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Image Message",
      "name": "Image Message",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Convert to Image File",
      "name": "Convert to Image File",
      "integration": "convertToFile",
      "kind": "action"
    },
    {
      "id": "Extract from File to Base64",
      "name": "Extract from File to Base64",
      "integration": "extractFromFile",
      "kind": "action"
    },
    {
      "id": "Text Classifier Audio",
      "name": "Text Classifier Audio",
      "integration": "@n8n/n8n-nodes-langchain.textClassifier",
      "kind": "action"
    },
    {
      "id": "Text Classifier",
      "name": "Text Classifier",
      "integration": "@n8n/n8n-nodes-langchain.textClassifier",
      "kind": "action"
    },
    {
      "id": "Telegram Token & Webhooks",
      "name": "Telegram Token & Webhooks",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Get Webhook Status",
      "name": "Get Webhook Status",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Validation",
      "name": "Validation",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Message Router",
      "name": "Message Router",
      "integration": "switch",
      "kind": "logic"
    }
  ],
  "edges": [
    {
      "from": "Get Image",
      "to": "Extract from File to Base64"
    },
    {
      "from": "Validation",
      "to": "Check User & Chat ID"
    },
    {
      "from": "Edit Fields",
      "to": "Text Classifier"
    },
    {
      "from": "Image Schema",
      "to": "Get Image"
    },
    {
      "from": "Analyze Image",
      "to": "Image Message"
    },
    {
      "from": "Get Audio File",
      "to": "Transcribe Recording"
    },
    {
      "from": "Message Router",
      "to": "Get Audio File"
    },
    {
      "from": "Message Router",
      "to": "Edit Fields"
    },
    {
      "from": "Message Router",
      "to": "Image Schema"
    },
    {
      "from": "Message Router",
      "to": "Error message"
    },
    {
      "from": "Text Classifier",
      "to": "Text Task Message"
    },
    {
      "from": "Text Classifier",
      "to": "Text Other Message"
    },
    {
      "from": "Check User & Chat ID",
      "to": "Message Router"
    },
    {
      "from": "Check User & Chat ID",
      "to": "Error message"
    },
    {
      "from": "Set Webhook Test URL",
      "to": "Test Webhook Status"
    },
    {
      "from": "Transcribe Recording",
      "to": "Text Classifier Audio"
    },
    {
      "from": "Convert to Image File",
      "to": "Analyze Image"
    },
    {
      "from": "Text Classifier Audio",
      "to": "Audio Task Message"
    },
    {
      "from": "Text Classifier Audio",
      "to": "Audio Other Message"
    },
    {
      "from": "Get Telegram Webhook Info",
      "to": "Get Webhook Status"
    },
    {
      "from": "Telegram Token & Webhooks",
      "to": "Set Webhook Production URL"
    },
    {
      "from": "Telegram Token & Webhooks",
      "to": "Set Webhook Test URL"
    },
    {
      "from": "Telegram Token & Webhooks",
      "to": "Get Telegram Webhook Info"
    },
    {
      "from": "Listen for Telegram Events",
      "to": "Validation"
    },
    {
      "from": "Set Webhook Production URL",
      "to": "Production Webhook Status"
    },
    {
      "from": "Extract from File to Base64",
      "to": "Convert to Image File"
    }
  ]
}