{
  "name": "Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato",
  "nodes": [
    {
      "id": "b8a41b63-8c48-4964-befe-b949f3e9b755",
      "name": "Upload Video to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2580,
        920
      ]
    },
    {
      "id": "ac7a8bf1-b9ec-4a25-8c14-6d90abbc5568",
      "name": "Post to Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        120
      ]
    },
    {
      "id": "be0a1831-c0e3-4753-b114-2cd7cc66fae2",
      "name": "Post to YouTube",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        320
      ]
    },
    {
      "id": "62087008-dd5a-49f4-a764-a10b1c82e4e0",
      "name": "Post to TikTok",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        520
      ]
    },
    {
      "id": "976b075d-c98b-45a4-bf76-06a34d5ccbf3",
      "name": "Post to Facebook Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        720
      ]
    },
    {
      "id": "c689c5d4-f63c-4fc2-b2d6-e1d2d03a236a",
      "name": "Post to Threads",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        920
      ]
    },
    {
      "id": "88c8bd03-342e-4844-9489-28a5a93426e0",
      "name": "Post to Twitter (X)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        1120
      ]
    },
    {
      "id": "db6fb042-731e-46ce-8f4d-07e2b427739c",
      "name": "Post to LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        1320
      ]
    },
    {
      "id": "2102531c-624a-49b6-8b99-7a43e5067585",
      "name": "Post to Bluesky",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        1520
      ]
    },
    {
      "id": "a9826150-6e26-4174-af74-1b4dd8016638",
      "name": "Post to Pinterest",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2800,
        1720
      ]
    },
    {
      "id": "fcd6f25a-f6e9-4952-8be8-37eafbf7d07f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        0
      ],
      "parameters": {
        "width": 880,
        "height": 1900,
        "content": "# 🟥 STEP 5 — Auto-Publish to 9 Social Platforms\n## The final step automates distribution using Blotato’s API.\n"
      }
    },
    {
      "id": "eb822c9d-cb51-4df7-98d6-a0941a9833bd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 2260,
        "height": 760,
        "content": "# 🟫 STEP 1 — Create Video Using AI (image or text)\n## This step handles the full video creation pipeline using AI.\n### It starts from a Telegram message containing a prompt or image, \n"
      }
    },
    {
      "id": "1c209fe5-fd5a-45d7-9546-421710eb501d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        840
      ],
      "parameters": {
        "width": 1500,
        "height": 520,
        "content": "# 🟫 STEP 2 — Create Music\n## Here, a short-form voice-over script is generated using GPT-4 based on the topic.\n### The script is converted to speech, uploaded, and merged with the AI-generated video —"
      }
    },
    {
      "id": "0bf198f2-16f9-4ae9-aef3-919b5755da5a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1440
      ],
      "parameters": {
        "width": 1500,
        "height": 460,
        "content": "# 🟫 STEP 3 — Add Captions to Enhance Engagement\n## To increase accessibility and boost social engagement, \n## this step overlays professional-looking subtitles on the video using a styling template.\n#"
      }
    },
    {
      "id": "00c67803-c937-491e-bf2a-2d76774de07f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1580,
        840
      ],
      "parameters": {
        "width": 680,
        "height": 1060,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# 🟫 STEP 4 — Save Video & Notify via Telegram\n## This step generates a title and caption for the video, \n## saves the content metadata to a Google Sheet for"
      }
    },
    {
      "id": "5a08a003-68b1-48e5-8851-bb1a77d18a37",
      "name": "Trigger Telegram Prompt or Image",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        80,
        280
      ]
    },
    {
      "id": "6c4d7dd5-7676-465a-ac02-cf7192bf70ab",
      "name": "Split Prompt or Image Input",
      "type": "n8n-nodes-base.code",
      "position": [
        280,
        280
      ]
    },
    {
      "id": "3c203e0c-d133-4c6f-a801-2e5dab690b8a",
      "name": "Condition Input Type (Image or Text)",
      "type": "n8n-nodes-base.if",
      "position": [
        460,
        280
      ]
    },
    {
      "id": "1898fd9c-2164-44d0-8ada-192107565b64",
      "name": "Download Image from Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        760,
        440
      ]
    },
    {
      "id": "6f9755e0-db11-4c3e-9d1b-f9c97c832cbd",
      "name": "Extract Image File URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        440
      ]
    },
    {
      "id": "66abae9c-10ae-4845-9070-cd5f2d208782",
      "name": "Upload Image to Cloudinary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        440
      ]
    },
    {
      "id": "26979ac8-6f1d-4a9b-b0b5-42b4d7165ffe",
      "name": "Convert Image to Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        440
      ]
    },
    {
      "id": "36168808-54e8-4826-a3f5-bd8148da9a55",
      "name": "Wait for Image-to-Video Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        1520,
        440
      ]
    },
    {
      "id": "dd364492-ffcb-47e4-a24e-fb5b3c5b4ab5",
      "name": "Get Image-Based Video URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        440
      ]
    },
    {
      "id": "8a6b0c07-8304-403e-842e-ea60b0d5e939",
      "name": "Generate Video with blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        760,
        120
      ]
    },
    {
      "id": "14f39088-402d-477e-afe7-1fa8a3f0edf5",
      "name": "Wait for blotato Video Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        1520,
        120
      ]
    },
    {
      "id": "540a8cbf-0b41-4102-b2c3-a69480603cb6",
      "name": "Get blotato Video URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        120
      ]
    },
    {
      "id": "e549069b-0acb-44dd-ba58-d6fe76b4b782",
      "name": "Merge Video Data (Image or Prompt)",
      "type": "n8n-nodes-base.set",
      "position": [
        2060,
        440
      ]
    },
    {
      "id": "4482e940-fdee-498a-9b4c-dd44a12f04a9",
      "name": "Generate Music with Piapi",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        60,
        1040
      ]
    },
    {
      "id": "e2187d71-aace-4cf4-8ef3-b4b14d255f54",
      "name": "Wait for Music Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        480,
        1040
      ]
    },
    {
      "id": "8ea22e87-0803-4618-a4cb-08a6b720838e",
      "name": "Get Music File URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        700,
        1040
      ]
    },
    {
      "id": "61b49201-e9d5-44b8-be6c-d0175596d261",
      "name": "Generate Script (GPT-4o-mini)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        920,
        1040
      ]
    },
    {
      "id": "30394110-bc11-4139-8303-f536e22733d4",
      "name": "Split Script",
      "type": "n8n-nodes-base.code",
      "position": [
        1300,
        1040
      ]
    },
    {
      "id": "15d7845c-0e0b-4f06-b48e-5ea8add6501a",
      "name": "Merge Video + Music",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        1640
      ]
    },
    {
      "id": "5b014111-3dfc-4190-83cf-b5915a47df1b",
      "name": "Wait for Fusion Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        260,
        1640
      ]
    },
    {
      "id": "fdc02ec0-b3ce-49e3-9f20-096c679eacbe",
      "name": "Get Final Video URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        1640
      ]
    },
    {
      "id": "9b865654-337a-4dd5-89d4-4a131f6eed75",
      "name": "Generate Social Caption (GPT-4)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        720,
        1640
      ]
    },
    {
      "id": "99a4282b-5d68-4f4d-8b1e-c7975221b92f",
      "name": "Generate SEO Title (GPT-4)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1160,
        1640
      ]
    },
    {
      "id": "3cbe9fb8-1685-4169-9ee1-3ae72f3190e3",
      "name": "Append Video Data to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1640,
        920
      ]
    },
    {
      "id": "dd947cd3-747f-484f-93ea-990d977ab113",
      "name": "Send Final Video to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1860,
        920
      ]
    },
    {
      "id": "c17efd9a-2428-4c36-acd8-69c47d01b961",
      "name": "Send Caption to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2060,
        920
      ]
    },
    {
      "id": "b3311fa9-c473-4bd1-8de7-0930c4e799cd",
      "name": "Assign Platform IDs for Blotato",
      "type": "n8n-nodes-base.set",
      "position": [
        2360,
        920
      ]
    }
  ],
  "connections": {
    "Split Script": {
      "main": [
        [
          {
            "node": "Merge Video + Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Music File URL": {
      "main": [
        [
          {
            "node": "Generate Script (GPT-4o-mini)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Final Video URL": {
      "main": [
        [
          {
            "node": "Generate Social Caption (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Video + Music": {
      "main": [
        [
          {
            "node": "Wait for Fusion Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get blotato Video URL": {
      "main": [
        [
          {
            "node": "Merge Video Data (Image or Prompt)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Image to Video": {
      "main": [
        [
          {
            "node": "Wait for Image-to-Video Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image File URL": {
      "main": [
        [
          {
            "node": "Upload Image to Cloudinary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to Blotato": {
      "main": [
        [
          {
            "node": "Post to Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to YouTube",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to TikTok",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Facebook Page",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Threads",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Twitter (X)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to LinkedIn",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Bluesky",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post to Pinterest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Caption to Telegram": {
      "main": [
        [
          {
            "node": "Assign Platform IDs for Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Music with Piapi": {
      "main": [
        [
          {
            "node": "Wait for Music Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image-Based Video URL": {
      "main": [
        [
          {
            "node": "Merge Video Data (Image or Prompt)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Music Generation": {
      "main": [
        [
          {
            "node": "Get Music File URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate SEO Title (GPT-4)": {
      "main": [
        [
          {
            "node": "Append Video Data to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to Cloudinary": {
      "main": [
        [
          {
            "node": "Convert Image to Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Fusion Completion": {
      "main": [
        [
          {
            "node": "Get Final Video URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video with blotato": {
      "main": [
        [
          {
            "node": "Wait for blotato Video Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Prompt or Image Input": {
      "main": [
        [
          {
            "node": "Condition Input Type (Image or Text)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image from Telegram": {
      "main": [
        [
          {
            "node": "Extract Image File URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Final Video to Telegram": {
      "main": [
        [
          {
            "node": "Send Caption to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Script (GPT-4o-mini)": {
      "main": [
        [
          {
            "node": "Split Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Platform IDs for Blotato": {
      "main": [
        [
          {
            "node": "Upload Video to Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Social Caption (GPT-4)": {
      "main": [
        [
          {
            "node": "Generate SEO Title (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Telegram Prompt or Image": {
      "main": [
        [
          {
            "node": "Split Prompt or Image Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for blotato Video Rendering": {
      "main": [
        [
          {
            "node": "Get blotato Video URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Video Data to Google Sheet": {
      "main": [
        [
          {
            "node": "Send Final Video to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Image-to-Video Rendering": {
      "main": [
        [
          {
            "node": "Get Image-Based Video URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Video Data (Image or Prompt)": {
      "main": [
        [
          {
            "node": "Generate Music with Piapi",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Condition Input Type (Image or Text)": {
      "main": [
        [
          {
            "node": "Generate Video with blotato",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Image from Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}