{
  "name": "Midjourney Image Generator via Telegram and GoAPI",
  "nodes": [
    {
      "id": "24695c33-e016-4df2-b31c-259c4dba4efe",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        60,
        165
      ]
    },
    {
      "id": "bc21ef50-c305-4f27-895d-019ecc5ec3f7",
      "name": "Task",
      "type": "n8n-nodes-base.set",
      "position": [
        500,
        165
      ]
    },
    {
      "id": "3ade84ce-e582-445b-b9aa-42b85d763d8a",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1600,
        265
      ]
    },
    {
      "id": "309a8c7e-74e8-4e0b-9022-be9b524261d7",
      "name": "Generate Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        165
      ]
    },
    {
      "id": "dbbc2387-0d6e-4ef5-b777-b6a5d95db5ee",
      "name": "Upscale",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1820,
        40
      ]
    },
    {
      "id": "f48fbeff-71fd-45ca-abec-7decbab1e524",
      "name": "Get Upscale",
      "type": "n8n-nodes-base.if",
      "position": [
        2480,
        -110
      ]
    },
    {
      "id": "84c2c579-39ed-4940-9ded-9b9056a12767",
      "name": "Notify Generation",
      "type": "n8n-nodes-base.telegram",
      "position": [
        940,
        165
      ]
    },
    {
      "id": "42506f9c-b2af-425d-8a5b-7f0fb8046d1c",
      "name": "Notify Upscaling",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2040,
        40
      ]
    },
    {
      "id": "dac78f7a-02d6-4592-ae2a-ca6b6c01e9e4",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        2700,
        140
      ]
    },
    {
      "id": "15c49101-d579-44ae-baed-3d01522a1d96",
      "name": "Status = complete",
      "type": "n8n-nodes-base.if",
      "position": [
        1380,
        90
      ]
    },
    {
      "id": "c22de90c-3d63-47c9-a2f1-3363d261ba1f",
      "name": "Get Index to Upscale",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1600,
        40
      ]
    },
    {
      "id": "a02dac7e-365f-46f6-bc2e-8b4a9c3e8376",
      "name": "Discord - Generation Log",
      "type": "n8n-nodes-base.discord",
      "position": [
        2700,
        -260
      ]
    },
    {
      "id": "5a91e49a-449c-453a-a3b5-a7a74f7eeaae",
      "name": "Main Log",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2700,
        -60
      ]
    },
    {
      "id": "3c144117-29a9-4ee9-9b55-a94daf6c7a98",
      "name": "Get Prompt",
      "type": "n8n-nodes-base.if",
      "position": [
        280,
        165
      ]
    },
    {
      "id": "c80a05ba-51ce-44b7-9c28-3ea20ea96fa0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -180
      ],
      "parameters": {
        "width": 420,
        "height": 240,
        "content": "## Setup Instructions\n- Create a Telegram Bot and get the [Token](https://help.zoho.com/portal/en/kb/desk/support-channels/instant-messaging/telegram/articles/telegram-integration-with-zoho-desk#How_t"
      }
    },
    {
      "id": "bf94e126-8d22-4e12-bfc7-081867ae4e29",
      "name": "Get Generation Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1160,
        165
      ]
    },
    {
      "id": "b37fb1b0-4227-4ab9-a211-64120706dd54",
      "name": "Get Upscale Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2260,
        40
      ]
    },
    {
      "id": "aa413bd6-0468-4497-9b27-2b55bd4ecbf7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2620,
        -360
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "### Optional Log.\nDelete this Node if you don't want to get Logs in Discord."
      }
    }
  ],
  "connections": {
    "Task": {
      "main": [
        [
          {
            "node": "Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Generation Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Upscale Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upscale": {
      "main": [
        [
          {
            "node": "Notify Upscaling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Prompt": {
      "main": [
        [
          {
            "node": "Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Upscale": {
      "main": [
        [
          {
            "node": "Main Log",
            "type": "main",
            "index": 0
          },
          {
            "node": "Discord - Generation Log",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Notify Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Upscale Task": {
      "main": [
        [
          {
            "node": "Get Upscale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Upscaling": {
      "main": [
        [
          {
            "node": "Get Upscale Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Get Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Generation": {
      "main": [
        [
          {
            "node": "Get Generation Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status = complete": {
      "main": [
        [
          {
            "node": "Get Index to Upscale",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Generation Task": {
      "main": [
        [
          {
            "node": "Status = complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Index to Upscale": {
      "main": [
        [
          {
            "node": "Upscale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}