{
  "name": "Create and publish AI carousel posts from Telegram to Instagram, Facebook and TikTok with OpenAI, APITemplate.io and Blotato",
  "nodes": [
    {
      "id": "22e610ed-104a-47fa-949b-8c4a90e3e53c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -5552,
        3024
      ]
    },
    {
      "id": "b48dedf7-551e-40a2-b074-d43e62c350d0",
      "name": "Speech to Text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -5776,
        2720
      ]
    },
    {
      "id": "70d9afe4-a23e-4297-a4dd-b6f37fdc32f9",
      "name": "Get Voice File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -6000,
        2720
      ]
    },
    {
      "id": "1d580db9-8cbe-4792-b154-e8fcdb7929eb",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -5424,
        3024
      ]
    },
    {
      "id": "03e8afd0-5e24-41d9-b5ee-3cf2d04827cc",
      "name": "Start: Telegram Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -6672,
        2800
      ]
    },
    {
      "id": "12c2bfb6-85da-452e-849a-c543cfaff289",
      "name": "Extract text from Telegram message",
      "type": "n8n-nodes-base.set",
      "position": [
        -6448,
        2800
      ]
    },
    {
      "id": "f169a74d-a416-4b86-bc1f-fdf6284c5a4d",
      "name": "Check if input is a voice message",
      "type": "n8n-nodes-base.if",
      "position": [
        -6224,
        2800
      ]
    },
    {
      "id": "d65b5ce3-5faf-49c5-a076-4241a9569b02",
      "name": "AI: Draft & Revise Post",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -5488,
        2800
      ]
    },
    {
      "id": "16df2f24-7143-4bda-bde9-dfb96b528915",
      "name": "Send draft to Telegram for review",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4704,
        2896
      ]
    },
    {
      "id": "93a4edf8-2c03-4d61-bf7f-5d4585c0b86d",
      "name": "Check if Approved",
      "type": "n8n-nodes-base.if",
      "position": [
        -4928,
        2800
      ]
    },
    {
      "id": "9359c1ad-8244-4b24-ae67-bbde59a77c1c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -5136,
        3232
      ]
    },
    {
      "id": "b928edd2-1028-43dc-a32c-0e7cd4c23b42",
      "name": "Log approved quotes in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4480,
        2896
      ]
    },
    {
      "id": "00a6db42-815f-40b5-ada8-5cf095201928",
      "name": "Notify user: preparing post",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4480,
        2288
      ]
    },
    {
      "id": "2394fc8d-fab2-4342-9b23-edea6a34c4b1",
      "name": "Generate carousel slide 1",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        -4256,
        2416
      ]
    },
    {
      "id": "c6d0e011-4311-4386-ab4b-a4648ca2da50",
      "name": "Generate carousel slide 5",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        -4256,
        3184
      ]
    },
    {
      "id": "b18b8a2b-902a-4777-bb60-615ef063a3e9",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        -5296,
        3024
      ]
    },
    {
      "id": "1152c829-4f41-497b-b08c-88074abcd60a",
      "name": "OpenAI Chat Model (parser)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -5296,
        3232
      ]
    },
    {
      "id": "b5a117f9-4c77-4399-b9f8-f86439443085",
      "name": "Collect all image URLs for publishing",
      "type": "n8n-nodes-base.set",
      "position": [
        -3744,
        2768
      ]
    },
    {
      "id": "b7a76bd4-015e-49aa-b663-4510eac05aa8",
      "name": "Generate carousel slide 2",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        -4256,
        2608
      ]
    },
    {
      "id": "67301488-0910-4262-9400-8f6a0939c72b",
      "name": "Generate carousel slide 3",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        -4256,
        2800
      ]
    },
    {
      "id": "76534331-f9f3-485a-aacd-84c90968af70",
      "name": "Generate carousel slide 4",
      "type": "n8n-nodes-base.apiTemplateIo",
      "position": [
        -4256,
        2992
      ]
    },
    {
      "id": "8d666f69-a3ea-4c8d-ae9c-b153fef67e56",
      "name": "Merge all carousel slides",
      "type": "n8n-nodes-base.merge",
      "position": [
        -3920,
        2720
      ]
    },
    {
      "id": "e8361bd7-722c-4618-96e4-b18920e10c1a",
      "name": "Extract approved quotes",
      "type": "n8n-nodes-base.set",
      "position": [
        -4704,
        2384
      ]
    },
    {
      "id": "e06a0ea3-5881-449f-82bc-34c68b8e3d8b",
      "name": "Create Instagram Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3504,
        2304
      ]
    },
    {
      "id": "1234dd01-22c2-4f49-b3a3-a68062516777",
      "name": "Create Facebook Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3504,
        2832
      ]
    },
    {
      "id": "b3b8abe1-fe37-4ad1-a0e9-0b3c327d32a1",
      "name": "Create TikTok Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3504,
        3264
      ]
    },
    {
      "id": "a8bf7fe1-112e-475d-b947-d483f68f1f53",
      "name": "Wait 25s before checking Instagram",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3280,
        2304
      ]
    },
    {
      "id": "8b117806-58e6-4fd9-9a8e-b37f0630dbf5",
      "name": "Instagram still processing?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2608,
        2336
      ]
    },
    {
      "id": "19f0bac4-8a21-440f-b3c3-74048284aeaa",
      "name": "Retry: wait 5s for Instagram",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2384,
        2496
      ]
    },
    {
      "id": "d4b9198e-cf71-40bf-896d-e5ecc342c856",
      "name": "Instagram post published?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2832,
        2240
      ]
    },
    {
      "id": "e66da340-18e1-4441-a696-cb5200445f89",
      "name": "Send Instagram error notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2384,
        2288
      ]
    },
    {
      "id": "c3966bf1-229e-477b-b85c-6112187817e8",
      "name": "Instagram Check Post Status",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3056,
        2304
      ]
    },
    {
      "id": "fba4548c-cb72-4516-9c3d-ccf2d379bb13",
      "name": "Send Instagram success notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2608,
        2144
      ]
    },
    {
      "id": "a29642bc-26ea-475b-bce6-e42c0ba8c3c9",
      "name": "Facebook still processing?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2608,
        2768
      ]
    },
    {
      "id": "c10f676f-3474-4b49-b81b-c5eaae0433ee",
      "name": "Retry: wait 5s for Facebook",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2384,
        2928
      ]
    },
    {
      "id": "e82113e4-4368-4db3-ae84-4effd6564eb8",
      "name": "Facebook post published?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2832,
        2768
      ]
    },
    {
      "id": "0b2992ba-1aa4-4b16-8a02-3df17ba5e89a",
      "name": "Send Facebook error notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2384,
        2720
      ]
    },
    {
      "id": "cc788e16-1afc-4075-a1ca-0ace7d74af61",
      "name": "TikTok still processing?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2608,
        3200
      ]
    },
    {
      "id": "ac0a56b3-e193-4822-a625-9d8a91db3bb5",
      "name": "Retry: wait 5s for TikTok",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2384,
        3360
      ]
    },
    {
      "id": "2af19ecc-8ef3-4ce3-8702-e982508eb99b",
      "name": "TikTok post published?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2832,
        3200
      ]
    },
    {
      "id": "030b1958-97d0-4023-b41d-668b19626b5d",
      "name": "Send TikTok error notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2384,
        3152
      ]
    },
    {
      "id": "a776b802-7e7c-44ef-ace1-b66d0ed7a37d",
      "name": "Wait 10s before checking Facebook",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3280,
        2832
      ]
    },
    {
      "id": "eba583ed-7313-4148-864b-9b19baa09996",
      "name": "Wait 10s before checking TikTok",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3280,
        3264
      ]
    },
    {
      "id": "907773ac-4e99-4a96-b7d1-9e6dc39e0cb2",
      "name": "TikTok Check Post Status",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3056,
        3264
      ]
    },
    {
      "id": "a7915d0d-1189-4385-b9f2-00b0772ab03e",
      "name": "Facebook Check Post Status",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        -3056,
        2832
      ]
    },
    {
      "id": "058fc0ab-ea73-41a0-a8ba-82dc1a2f161e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7392,
        2496
      ],
      "parameters": {
        "width": 520,
        "height": 880,
        "content": "## Create and publish AI carousel posts to Instagram, Facebook, and TikTok\n\nTurn a **Telegram message or voice note** into polished carousel posts published simultaneously to **Instagram, Facebook, an"
      }
    },
    {
      "id": "dd88eef1-5ace-4a93-a148-8b4312201c45",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6752,
        2512
      ],
      "parameters": {
        "width": 1164,
        "height": 860,
        "content": "### Step 1: Telegram Input & Voice Transcription\nUser sends a text message or voice note. Voice notes are transcribed via OpenAI Whisper before being passed to the AI agent."
      }
    },
    {
      "id": "11dcf35c-f262-4ff7-9a35-2c7191d36348",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5568,
        2512
      ],
      "parameters": {
        "width": 752,
        "height": 848,
        "content": "### Step 2: AI Script Writer & Approval\nAn OpenAI-powered AI Agent with conversation memory drafts a script, 5 carousel quotes, and a social media caption. The user iterates via Telegram until approvi"
      }
    },
    {
      "id": "823cc350-9559-4f4a-82fe-647d57e8b015",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4800,
        2080
      ],
      "parameters": {
        "width": 1196,
        "height": 1292,
        "content": "### Step 3: Image Generation\nAll 5 quotes are sent to APITemplate.io to generate styled carousel slide images using your pre-designed template. Images are then merged and the public urls are collected"
      }
    },
    {
      "id": "d07d7345-b7d3-431c-8ac7-2b9a75ee36ea",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3568,
        2064
      ],
      "parameters": {
        "width": 1364,
        "height": 640,
        "content": "### Step 4.a: Instagram Publishing\nCreate Instagram post with status monitoring loop that retries while in-progress and sends a Telegram confirmation or error message."
      }
    },
    {
      "id": "68f7349d-cba2-4e2c-9551-9a91b5abbc7b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3568,
        2672
      ],
      "parameters": {
        "width": 1364,
        "height": 448,
        "content": "### Step 4.b: Facebook Publishing\nCreate Facebook post with status monitoring loop that retries while in-progress and sends a Telegram confirmation or error message."
      }
    },
    {
      "id": "3bdc03ff-e36a-461b-9570-6a4ce834904a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3568,
        3136
      ],
      "parameters": {
        "width": 1364,
        "height": 416,
        "content": "### Step 4.c: TikTok Publishing\nCreate TikTok post with status monitoring loop that retries while in-progress and sends a Telegram confirmation or error message."
      }
    }
  ],
  "connections": {
    "Get Voice File": {
      "main": [
        [
          {
            "node": "Speech to Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Speech to Text": {
      "main": [
        [
          {
            "node": "AI: Draft & Revise Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Approved": {
      "main": [
        [
          {
            "node": "Extract approved quotes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send draft to Telegram for review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Draft & Revise Post",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create TikTok Post": {
      "main": [
        [
          {
            "node": "Wait 10s before checking TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Facebook Post": {
      "main": [
        [
          {
            "node": "Wait 10s before checking Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI: Draft & Revise Post",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Create Instagram Post": {
      "main": [
        [
          {
            "node": "Wait 25s before checking Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TikTok post published?": {
      "main": [
        [],
        [
          {
            "node": "TikTok still processing?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Draft & Revise Post": {
      "main": [
        [
          {
            "node": "Check if Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract approved quotes": {
      "main": [
        [
          {
            "node": "Log approved quotes in Google Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify user: preparing post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start: Telegram Message": {
      "main": [
        [
          {
            "node": "Extract text from Telegram message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook post published?": {
      "main": [
        [],
        [
          {
            "node": "Facebook still processing?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "TikTok Check Post Status": {
      "main": [
        [
          {
            "node": "TikTok post published?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TikTok still processing?": {
      "main": [
        [
          {
            "node": "Retry: wait 5s for TikTok",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send TikTok error notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI: Draft & Revise Post",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate carousel slide 1": {
      "main": [
        [
          {
            "node": "Merge all carousel slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate carousel slide 2": {
      "main": [
        [
          {
            "node": "Merge all carousel slides",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generate carousel slide 3": {
      "main": [
        [
          {
            "node": "Merge all carousel slides",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Generate carousel slide 4": {
      "main": [
        [
          {
            "node": "Merge all carousel slides",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Generate carousel slide 5": {
      "main": [
        [
          {
            "node": "Merge all carousel slides",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Instagram post published?": {
      "main": [
        [
          {
            "node": "Send Instagram success notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Instagram still processing?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge all carousel slides": {
      "main": [
        [
          {
            "node": "Collect all image URLs for publishing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry: wait 5s for TikTok": {
      "main": [
        [
          {
            "node": "TikTok Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook Check Post Status": {
      "main": [
        [
          {
            "node": "Facebook post published?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook still processing?": {
      "main": [
        [
          {
            "node": "Retry: wait 5s for Facebook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Facebook error notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model (parser)": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Instagram Check Post Status": {
      "main": [
        [
          {
            "node": "Instagram post published?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram still processing?": {
      "main": [
        [
          {
            "node": "Retry: wait 5s for Instagram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Instagram error notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry: wait 5s for Facebook": {
      "main": [
        [
          {
            "node": "Facebook Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry: wait 5s for Instagram": {
      "main": [
        [
          {
            "node": "Instagram Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s before checking TikTok": {
      "main": [
        [
          {
            "node": "TikTok Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if input is a voice message": {
      "main": [
        [
          {
            "node": "Get Voice File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI: Draft & Revise Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s before checking Facebook": {
      "main": [
        [
          {
            "node": "Facebook Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract text from Telegram message": {
      "main": [
        [
          {
            "node": "Check if input is a voice message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 25s before checking Instagram": {
      "main": [
        [
          {
            "node": "Instagram Check Post Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log approved quotes in Google Sheets": {
      "main": [
        [
          {
            "node": "Generate carousel slide 1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate carousel slide 2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate carousel slide 3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate carousel slide 4",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate carousel slide 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect all image URLs for publishing": {
      "main": [
        [
          {
            "node": "Create Instagram Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Facebook Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create TikTok Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}