{
  "name": "Generate Images on Telegram 🤖🖼️ from Text and Voice using Grok Imagine & Kie AI",
  "nodes": [
    {
      "id": "20bc0b82-0680-4e01-a6d7-964726bbbb14",
      "name": "Grok 4.1 Fast",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -1920,
        -432
      ]
    },
    {
      "id": "8bde055b-3cfd-44f0-9d26-55ae340cc9f2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2944,
        -512
      ],
      "parameters": {
        "width": 672,
        "height": 288,
        "content": "## STEP2 - Upload image to server\nSet up your FTP space (eg. with [BunnyCDN](https://bunny.net?ref=0pfu5rh4tp))\n"
      }
    },
    {
      "id": "81623604-9e24-4113-afcb-d13bd1e93950",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        -816
      ],
      "parameters": {
        "width": 544,
        "height": 384,
        "content": "## STEP 3 Orchestrator Agents\nAnalyzes user input and determines whether to:\n- Generate a new image from text description (text-to-image)\n- Transform an existing image using a prompt (image-to-image)\n"
      }
    },
    {
      "id": "55cca75a-ae19-4a67-ae44-744ab7a52f49",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -3408,
        -656
      ]
    },
    {
      "id": "e34a35e5-c5a6-4d5f-93e2-d34e0b054291",
      "name": "Get Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -3728,
        -656
      ]
    },
    {
      "id": "af686a4b-6de0-4cb8-bbea-04f12815a803",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1344,
        -672
      ]
    },
    {
      "id": "6129572e-5e0b-450e-9223-e379be3c64ad",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3504,
        -752
      ],
      "parameters": {
        "width": 528,
        "height": 260,
        "content": "## STEP 1 - Telegram and switch\nSet your Telegram ID here"
      }
    },
    {
      "id": "c1feb40e-89e5-4a58-b60a-a9beff7175b2",
      "name": "Get Text",
      "type": "n8n-nodes-base.set",
      "position": [
        -2464,
        -896
      ]
    },
    {
      "id": "f552f3e2-5be1-4806-ac44-128b75abd2ad",
      "name": "Switch2",
      "type": "n8n-nodes-base.switch",
      "position": [
        -3184,
        -672
      ]
    },
    {
      "id": "b8fc1ccf-2a00-4e71-a0ea-0c4b9a6b43d3",
      "name": "Run text to image",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -1536,
        -416
      ]
    },
    {
      "id": "b7da96ac-d65b-4694-bd26-60772c123fdd",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2960,
        0
      ]
    },
    {
      "id": "2f7c2d49-5c35-4573-947d-e25452e8a50d",
      "name": "Run image to image",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -1392,
        -416
      ]
    },
    {
      "id": "f25c779d-9a31-489f-8b10-6f77804f3e81",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2944,
        400
      ]
    },
    {
      "id": "c00a8413-14d1-429c-8e72-6e92dc15a464",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -3504,
        208
      ]
    },
    {
      "id": "72382146-199e-48e3-a6b0-b5ea7973ae62",
      "name": "Run Kei AI",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -3696,
        208
      ]
    },
    {
      "id": "ccef57d4-8469-47b5-8e40-78323b491d89",
      "name": "Run text to image1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3184,
        0
      ]
    },
    {
      "id": "4e978597-e964-4f12-9079-5742362224e9",
      "name": "Run image to image1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3168,
        400
      ]
    },
    {
      "id": "c81563ee-8f79-4ae4-80f2-779b854ec6eb",
      "name": "Result text to image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2736,
        0
      ]
    },
    {
      "id": "30361085-5bda-4088-8f8c-f20c77e24729",
      "name": "Result image to image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2720,
        400
      ]
    },
    {
      "id": "c201993a-79b1-4f4e-9421-c75406b6d811",
      "name": "Get voice message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2912,
        -688
      ]
    },
    {
      "id": "4eb9358d-4ca7-4f09-a7ed-92fd4166f974",
      "name": "Transcribe recording",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -2688,
        -688
      ]
    },
    {
      "id": "303f065b-94e5-4752-9ce8-f964429cd949",
      "name": "Get image file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2896,
        -416
      ]
    },
    {
      "id": "bae9564b-11a8-471a-b453-1d51c6ab8d25",
      "name": "Upload image",
      "type": "n8n-nodes-base.ftp",
      "position": [
        -2672,
        -416
      ]
    },
    {
      "id": "95571314-da99-4483-85b8-873cf26789fa",
      "name": "Set Image Url",
      "type": "n8n-nodes-base.set",
      "position": [
        -2448,
        -416
      ]
    },
    {
      "id": "4923e186-f31c-4bbb-b811-ff567fc7870a",
      "name": "Get input text from voice",
      "type": "n8n-nodes-base.set",
      "position": [
        -2464,
        -688
      ]
    },
    {
      "id": "b31fea73-8055-4cdf-aa89-1365fbd5beab",
      "name": "Grok Imagine Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1840,
        -672
      ]
    },
    {
      "id": "3572cc8a-3d80-4dac-9b3e-dfed740c6d81",
      "name": "Simple Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1760,
        -432
      ]
    },
    {
      "id": "7f9b85ee-00ce-45e4-99ed-faf3d3cf2158",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3328,
        -144
      ],
      "parameters": {
        "width": 880,
        "height": 784,
        "content": "## STEP  4 -  Kie AI API\nGet your [Kie API Key](https://kie.ai?ref=188b79f5cb949c9e875357ac098e1ff5) for FREE and set Bearer Token"
      }
    },
    {
      "id": "35655d03-5cd9-4140-868e-e3f84b600307",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3760,
        -1424
      ],
      "parameters": {
        "width": 784,
        "height": 640,
        "content": "## Image Generator Bot for Telegram (Text and Voice) using Grok Imagine via Kie AI\nThis workflow creates an **AI-powered Telegram bot** that allows users to generate and modify images using **Grok Ima"
      }
    },
    {
      "id": "96bed25d-19d0-4944-843b-6084b27bb0d7",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4528,
        -1520
      ],
      "parameters": {
        "width": 736,
        "height": 736,
        "content": "## MY NEW YOUTUBE CHANNEL\n👉 [Subscribe to my new **YouTube channel**](https://youtube.com/@n3witalia). Here I’ll share videos and Shorts with practical tutorials and **FREE templates for n8n**.\n\n[![im"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Switch2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Result text to image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Result image to image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Run text to image1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Run image to image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch2": {
      "main": [
        [
          {
            "node": "Get Text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get voice message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get image file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Text": {
      "main": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Kei AI": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Message": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload image": {
      "main": [
        [
          {
            "node": "Set Image Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Grok 4.1 Fast": {
      "ai_languageModel": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set Image Url": {
      "main": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get image file": {
      "main": [
        [
          {
            "node": "Upload image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get voice message": {
      "main": [
        [
          {
            "node": "Transcribe recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run text to image": {
      "ai_tool": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Grok Imagine Agent": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run image to image": {
      "ai_tool": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Run text to image1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run image to image1": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe recording": {
      "main": [
        [
          {
            "node": "Get input text from voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get input text from voice": {
      "main": [
        [
          {
            "node": "Grok Imagine Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}