{
  "name": "Generate Instagram carousels from Telegram prompts using OpenAI and Kie AI",
  "nodes": [
    {
      "id": "cc04075a-78be-427c-9aaf-13bb2fd3830c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -488,
        56
      ]
    },
    {
      "id": "79a5745e-9eda-4734-ad96-e1b74248aba0",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -616,
        56
      ]
    },
    {
      "id": "6fc2ea05-05f8-41df-9558-7c88b4c18fad",
      "name": "Start on Telegram Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1296,
        -168
      ]
    },
    {
      "id": "b121b44c-9350-49ce-8b30-b8d489e1f707",
      "name": "Set Brand Style",
      "type": "n8n-nodes-base.set",
      "position": [
        -848,
        -168
      ]
    },
    {
      "id": "7a7ed391-4f8a-4afe-abfd-9d3f90254d21",
      "name": "Generate Carousel Content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -624,
        -168
      ]
    },
    {
      "id": "d461fe6b-8fc2-40b4-b931-a99099f9396c",
      "name": "Generate Caption",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -272,
        -64
      ]
    },
    {
      "id": "fdb916fe-4d68-4630-a0a7-ab52efa1438b",
      "name": "Generate Carousel Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        -264
      ]
    },
    {
      "id": "e85a4264-b1c0-47c4-ab82-e1033b2500c5",
      "name": "Retrieve Carousel Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        -336
      ]
    },
    {
      "id": "58a821d5-f940-485a-8239-328df4abf4c3",
      "name": "Send Images to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1200,
        -264
      ]
    },
    {
      "id": "290cb5c6-4cf2-4b17-afba-7d0aee80f5dd",
      "name": "Download Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        976,
        -264
      ]
    },
    {
      "id": "1ec7e19f-b266-4f9e-a217-ff21543bc034",
      "name": "Send Caption to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1200,
        -64
      ]
    },
    {
      "id": "187fc879-8a2f-49a9-be03-693bfb6d5bf6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1792,
        -352
      ],
      "parameters": {
        "width": 368,
        "height": 544,
        "content": "## How it works\nThis workflow transforms a Telegram text prompt into a 5-slide Instagram carousel. An AI Agent plans the content and visual concepts, while a separate model writes an SEO-friendly capt"
      }
    },
    {
      "id": "85d509ac-f9d9-48ca-93d1-40b161fe0480",
      "name": "Check Image Generation Status",
      "type": "n8n-nodes-base.if",
      "position": [
        752,
        -264
      ]
    },
    {
      "id": "e87be366-7fc6-4ea6-9f99-e734f7254170",
      "name": "Wait for Image Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        304,
        -264
      ]
    },
    {
      "id": "65a622f2-2569-4542-9018-3a6d4c406e4b",
      "name": "Split Prompts",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -208,
        -264
      ]
    },
    {
      "id": "08a1ea7c-8bee-45aa-a7f3-8149b5d7c2dc",
      "name": "Verify User ID",
      "type": "n8n-nodes-base.if",
      "position": [
        -1072,
        -168
      ]
    },
    {
      "id": "e334cc8a-f4e7-4084-a519-2324f2c578a4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        -352
      ],
      "parameters": {
        "width": 688,
        "height": 544,
        "content": "## Step 1: Receive & Verify Input"
      }
    },
    {
      "id": "87dee421-841b-4d12-a177-0cbcec15aa45",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        -352
      ],
      "parameters": {
        "width": 672,
        "height": 544,
        "content": "## Step 2: Generate Content & Prompts"
      }
    },
    {
      "id": "8a5df199-61e5-403b-af84-73fd1f1aef36",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -352
      ],
      "parameters": {
        "width": 1056,
        "height": 544,
        "content": "## Step 3: Create Visuals"
      }
    },
    {
      "id": "924656d2-cd87-4ec2-9c79-e2b38f018ff3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -352
      ],
      "parameters": {
        "width": 272,
        "height": 544,
        "content": "## Step 4: Deliver Results"
      }
    }
  ],
  "connections": {
    "Split Prompts": {
      "main": [
        [
          {
            "node": "Generate Carousel Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify User ID": {
      "main": [
        [
          {
            "node": "Set Brand Style",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Images": {
      "main": [
        [
          {
            "node": "Send Images to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Brand Style": {
      "main": [
        [
          {
            "node": "Generate Carousel Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Caption": {
      "main": [
        [
          {
            "node": "Send Caption to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Carousel Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Carousel Images": {
      "main": [
        [
          {
            "node": "Wait for Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Carousel Images": {
      "main": [
        [
          {
            "node": "Check Image Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Carousel Content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Carousel Content": {
      "main": [
        [
          {
            "node": "Generate Caption",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start on Telegram Message": {
      "main": [
        [
          {
            "node": "Verify User ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Image Generation": {
      "main": [
        [
          {
            "node": "Retrieve Carousel Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image Generation Status": {
      "main": [
        [
          {
            "node": "Download Images",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}