{
  "name": "Command-based Telegram bot for article summarization & image prompts with OpenAI",
  "nodes": [
    {
      "id": "3da9ae2c-8134-437b-8ada-dcbee9c7fca5",
      "name": "Route: Check for Help Command",
      "type": "n8n-nodes-base.if",
      "position": [
        -1680,
        180
      ]
    },
    {
      "id": "70602bcc-9395-4fc6-bfbe-e6df5819e6e7",
      "name": "Response: Send Help Menu",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1420,
        -220
      ]
    },
    {
      "id": "df301046-be3d-4612-aeb3-c1138968a32e",
      "name": "Route: Check for Summary Command",
      "type": "n8n-nodes-base.if",
      "position": [
        -1400,
        100
      ]
    },
    {
      "id": "3c0f03df-5244-48b0-a9f6-249547b4a4a1",
      "name": "Route: Check for Image Command",
      "type": "n8n-nodes-base.if",
      "position": [
        -980,
        340
      ]
    },
    {
      "id": "f182faa1-0171-4794-9735-3c84986754fb",
      "name": "Response: Send Article Summary",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -140,
        -80
      ]
    },
    {
      "id": "301a03bc-50dc-46fe-b423-039f4e3ea7dd",
      "name": "Response: Send Image Generation Notice",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -20,
        280
      ]
    },
    {
      "id": "0204de3d-cfdf-4562-927b-f65777aaaeb1",
      "name": "Trigger: Telegram Webhook",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1940,
        20
      ]
    },
    {
      "id": "caba10fb-e86c-480b-ab81-c6a42976683b",
      "name": "Fetch: Download Article Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1040,
        -20
      ]
    },
    {
      "id": "a61c2bd8-7b6d-4710-b453-086905aae741",
      "name": "Parse: Extract Text from HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        -820,
        -20
      ]
    },
    {
      "id": "318cbba7-3240-44f8-be69-33738db1c97d",
      "name": "AI: Generate Article Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -600,
        -20
      ]
    },
    {
      "id": "da0dcfc6-6064-4983-801f-fd45a5034a62",
      "name": "AI: Process Image Generation Request",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -760,
        240
      ]
    },
    {
      "id": "50af4fa8-dc8a-4ef6-82b8-f37c17919b2b",
      "name": "StickyNote",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2700,
        -360
      ],
      "parameters": {
        "width": 600,
        "height": 880,
        "content": "# 🤖 Telegram Multi-Function Bot Workflow\n\n**Purpose:** This workflow creates a Telegram bot that handles multiple commands for article summarization and image generation.\n\n**Supported Commands:**\n- `/"
      }
    }
  ],
  "connections": {
    "Response: Send Help Menu": {
      "main": [
        [
          {
            "node": "Route: Check for Help Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: Telegram Webhook": {
      "main": [
        [
          {
            "node": "Route: Check for Help Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Article Summary": {
      "main": [
        [
          {
            "node": "Response: Send Article Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse: Extract Text from HTML": {
      "main": [
        [
          {
            "node": "AI: Generate Article Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route: Check for Help Command": {
      "main": [
        [
          {
            "node": "Response: Send Help Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route: Check for Summary Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route: Check for Image Command": {
      "main": [
        [
          {
            "node": "AI: Process Image Generation Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch: Download Article Content": {
      "main": [
        [
          {
            "node": "Parse: Extract Text from HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route: Check for Summary Command": {
      "main": [
        [
          {
            "node": "Fetch: Download Article Content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route: Check for Image Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Process Image Generation Request": {
      "main": [
        [
          {
            "node": "Response: Send Image Generation Notice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}