{
  "id": "VjG20MQiBaRSiaPD",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Generate AI videos from a prompt and publish to TikTok, Instagram, Facebook and X with Blotato",
  "tags": [],
  "nodes": [
    {
      "id": "1c2a9abb-fa46-468e-814b-91ae0ad27c3b",
      "name": "Receive content idea via Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        16,
        224
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "026ba35a-01da-4429-8bff-a17eff02fb72",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "video_prompt",
              "type": "string",
              "value": "={{ $('Receive content idea via Telegram').item.json.message.text }}"
            },
            {
              "id": "a2",
              "name": "post_caption",
              "type": "string",
              "value": "={{ $('Receive content idea via Telegram').item.json.message.text }}"
            },
            {
              "id": "a3",
              "name": "tiktok_privacy",
              "type": "string",
              "value": "PUBLIC_TO_EVERYONE"
            },
            {
              "id": "a4",
              "name": "is_ai_generated",
              "type": "boolean",
              "value": true
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4cb76e12-75be-4736-95f9-075c55d9c8df",
      "name": "Create AI video",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        800,
        224
      ],
      "parameters": {
        "prompt": "={{ $('Configuration').item.json.video_prompt }}",
        "resource": "video",
        "templateId": {
          "__rl": true,
          "mode": "list",
          "value": "/base/v2/tutorial-carousel/2491f97b-1b47-4efa-8b96-8c651fa7b3d5/v1",
          "cachedResultName": "Tutorial Carousel with Minimalist Flat Style"
        },
        "templateInputs": {
          "value": {
            "authorName": "Dr. FIRAS  ",
            "aspectRatio": "9:16",
            "profileName": "Dr. FIRAS  ",
            "profileImage": "https://www.dr-firas.com/logo.jpg"
          },
          "schema": [
            {
              "id": "profileImage",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "Profile Image * (publicly accessible URL)",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "font",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Font-sans",
                  "value": "font-sans"
                },
                {
                  "name": "Font-serif",
                  "value": "font-serif"
                },
                {
                  "name": "Font-mono",
                  "value": "font-mono"
                },
                {
                  "name": "Font-retro",
                  "value": "font-retro"
                },
                {
                  "name": "Font-montserrat",
                  "value": "font-montserrat"
                },
                {
                  "name": "Font-quicksand",
                  "value": "font-quicksand"
                },
                {
                  "name": "Font-philosopher",
                  "value": "font-philosopher"
                },
                {
                  "name": "Font-poppins",
                  "value": "font-poppins"
                },
                {
                  "name": "Font-raleway",
                  "value": "font-raleway"
                },
                {
                  "name": "Font-opensans",
                  "value": "font-opensans"
                },
                {
                  "name": "Font-lato",
                  "value": "font-lato"
                },
                {
                  "name": "Font-oswald",
                  "value": "font-oswald"
                },
                {
                  "name": "Font-playfair",
                  "value": "font-playfair"
                },
                {
                  "name": "Font-roboto",
                  "value": "font-roboto"
                },
                {
                  "name": "Font-ptsans",
                  "value": "font-ptsans"
                },
                {
                  "name": "Font-dmsans",
                  "value": "font-dmsans"
                },
                {
                  "name": "Font-nunito",
                  "value": "font-nunito"
                },
                {
                  "name": "Font-comfortaa",
                  "value": "font-comfortaa"
                },
                {
                  "name": "Font-worksans",
                  "value": "font-worksans"
                },
                {
                  "name": "Font-fjallaone",
                  "value": "font-fjallaone"
                },
                {
                  "name": "Font-rubik",
                  "value": "font-rubik"
                },
                {
                  "name": "Font-barlow",
                  "value": "font-barlow"
                },
                {
                  "name": "Font-bebasnue",
                  "value": "font-bebasnue"
                },
                {
                  "name": "Font-caveat",
                  "value": "font-caveat"
                },
                {
                  "name": "Font-pacifico",
                  "value": "font-pacifico"
                }
              ],
              "removed": false,
              "required": false,
              "displayName": "Font",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "mainTitle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Main Title",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "authorName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Author Name",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "ctaButtonText",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "CTA Button Text",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "contentItems",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Content Items (e.g. [\"item 1\", \"item 2\"])",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "backgroundColor",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Background Color",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "borderColor",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Border Color",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "textColor",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Text Color",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "ctaTitle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "CTA Title",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "ctaActions",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "CTA Action Buttons (e.g. [\"item 1\", \"item 2\"])",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "profileName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Profile Name",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "profileTitle",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Profile Title",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "profileDescription",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Profile Description",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "profileCta",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Profile CTA",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "aspectRatio",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "1:1",
                  "value": "1:1"
                },
                {
                  "name": "4:5",
                  "value": "4:5"
                },
                {
                  "name": "9:16",
                  "value": "9:16"
                }
              ],
              "removed": false,
              "required": false,
              "displayName": "Aspect Ratio",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d33c2630-f1fb-4b00-ae6e-d917d64c8cc7",
      "name": "Wait for render",
      "type": "n8n-nodes-base.wait",
      "position": [
        1168,
        224
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "0e727692-d954-41b1-8997-eb65f4351e6b",
      "name": "Get AI video",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1392,
        224
      ],
      "parameters": {
        "videoId": "={{ $json.item.id }}",
        "resource": "video",
        "operation": "get"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "e507ca7e-b86a-43f4-bc13-2317fb438678",
      "name": "Video ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "42174b7e-610d-4538-b071-3c4401b3b3a8",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.item.status }}",
              "rightValue": "done"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d39f16c3-5c02-4857-b775-77fa5681c211",
      "name": "Post to TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        704,
        592
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "30526",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/30526",
          "cachedResultName": "eliteshicos"
        },
        "postContentText": "={{ $('Generate caption').item.json.output }}",
        "postContentMediaUrls": "={{ $('Video ready?').item.json.item.imageUrls }}",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c47a837d-82e3-40a9-8f76-1f12bec5fcd7",
      "name": "Post to Instagram",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        928,
        592
      ],
      "parameters": {
        "options": {
          "instagramMediaType": "reel"
        },
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1687",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1687",
          "cachedResultName": "acces.a.vie"
        },
        "postContentText": "={{ $('Generate caption').item.json.output }}",
        "postContentMediaUrls": "={{ $('Video ready?').item.json.item.imageUrls }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "f7ea9d41-0728-44cd-a841-10ab7762c884",
      "name": "Post to Facebook",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        1152,
        592
      ],
      "parameters": {
        "options": {
          "facebookMediaType": "reel"
        },
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "101603614680195",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759/subaccounts/101603614680195",
          "cachedResultName": "Dr. Firas"
        },
        "postContentText": "={{ $('Generate caption').item.json.output }}",
        "postContentMediaUrls": "={{ $('Video ready?').item.json.item.imageUrls }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bfb211b2-e752-4aaa-8d78-d2996e46ed71",
      "name": "Post to X",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        1376,
        592
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1289",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1289",
          "cachedResultName": "Docteur_Firas"
        },
        "postContentText": "={{ $('Generate caption').item.json.output }}",
        "postContentMediaUrls": "={{ $('Video ready?').item.json.item.imageUrls }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "72e7d5af-aba9-4006-b9c2-2e89a4e98d27",
      "name": "Confirm on Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1584,
        592
      ],
      "parameters": {
        "text": "Video published to TikTok, Instagram, Facebook and X.",
        "chatId": "={{ $('Receive content idea via Telegram').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "81e9b49c-505e-48c8-8bb1-f3d9e20d9a33",
      "name": "Sticky Note 3dc7274e",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        48
      ],
      "parameters": {
        "width": 672,
        "height": 980,
        "content": "# Generate AI videos from a prompt and publish to TikTok, Instagram, Facebook and X with Blotato\n# \ud83d\udce5 [Open full documentation on Notion](https://automatisation.notion.site/Du-PDF-au-contenu-social-UPDF-workflow-n8n-TikTok-Instagram-Facebook-X-38b3d6550fd9814ba16bce6a52a3c285?pvs=73)\n\n## How it works\nTurn one content idea into a finished short video, published to four platforms automatically.\n1. You send a content idea (a prompt) to a Telegram bot.\n2. The Configuration node centralizes every adjustable setting.\n3. [Blotato](https://blotato.com/?ref=firas) generates a vertical video from your prompt and a chosen template.\n4. The workflow waits and polls until the video is rendered.\n5. The finished video is posted to TikTok, Instagram, Facebook and X.\n6. A Telegram message confirms publication.\n\n## Setup\n1. Add your Blotato API credential to every Blotato node.\n2. Add your Telegram bot credential to the trigger and the confirmation node.\n3. In \"Create AI video\", pick your template (e.g. \"Tutorial Carousel with Minimalist Flat Style\").\n4. In each post node, select the matching social account. For Facebook, also select the Page.\n5. Activate the workflow and send a prompt to your bot.\n\n## Requirements\n- An n8n instance with the Blotato community node installed (self-hosted, or n8n Cloud with Verified Community Nodes enabled).\n- A paid [Blotato](https://blotato.com/?ref=firas) account with TikTok, Instagram, Facebook and X connected.\n- A Telegram bot.\n\n## Customization\n- Edit the Configuration node to change the default caption, the TikTok privacy level, or the AI-generated flag.\n- Swap the Blotato template to change the video style.\n- Adjust the Wait time if your videos take longer to render."
      },
      "typeVersion": 1
    },
    {
      "id": "aa6ce5f5-2311-4212-9957-a16f7105f780",
      "name": "Sticky Note ad1f457a",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        64
      ],
      "parameters": {
        "color": 5,
        "width": 460,
        "height": 312,
        "content": "## Configuration\nBeginners adjust everything here: the video prompt, the post caption, the TikTok privacy level and the AI-generated flag."
      },
      "typeVersion": 1
    },
    {
      "id": "40b879a5-2fad-43a3-a87b-f191d6777116",
      "name": "Sticky Note 4653a791",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        64
      ],
      "parameters": {
        "color": 5,
        "width": 1088,
        "height": 312,
        "content": "## Generate the video\nBlotato creates the video from your prompt and template, then we poll until the status is \"done\"."
      },
      "typeVersion": 1
    },
    {
      "id": "719070ca-1b19-4751-bf56-430a46ca8625",
      "name": "Sticky Note ba5c302f",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        432
      ],
      "parameters": {
        "color": 5,
        "width": 1084,
        "height": 344,
        "content": "## Publish everywhere\nThe finished video is posted to TikTok, Instagram, Facebook and X, then Telegram confirms."
      },
      "typeVersion": 1
    },
    {
      "id": "9290948a-eed1-405d-b1f0-61d1abd4ee76",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        848
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fdb48161-3846-48ea-b04e-0e80c5b7682b",
      "name": "Generate caption",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        304,
        592
      ],
      "parameters": {
        "text": "={{ $('Configuration').item.json.video_prompt }}",
        "options": {
          "systemMessage": "You are an expert social media copywriter. From the content provided by the user, write ONE single caption that will be published AS-IS, at the same time, on TikTok, Instagram, Facebook and X.\n\nRules:\n- Write in the same language as the provided content.\n- Keep it short: 280 characters maximum so it fits on X.\n- Start with a strong hook, make it engaging and shareable, easy to read.\n- No markdown, no bold, no headings. Emojis allowed but keep them minimal.\n- Add at most 2 relevant hashtags at the very end.\n- Output ONLY the final caption text: no quotes, no explanation, no options."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "68fce45b-cdf1-4f14-8d71-72cf25504464",
      "name": "Caption section note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        432
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 344,
        "content": "## Generate the caption\nAn AI agent (OpenAI) writes ONE short caption (max 2 hashtags) reused as-is on TikTok, Instagram, Facebook and X."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "8d337f91-3ebc-4e8a-b6c1-0f9849edff43",
  "nodeGroups": [],
  "connections": {
    "Post to X": {
      "main": [
        [
          {
            "node": "Confirm on Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get AI video": {
      "main": [
        [
          {
            "node": "Video ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video ready?": {
      "main": [
        [
          {
            "node": "Generate caption",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for render",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration": {
      "main": [
        [
          {
            "node": "Create AI video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to TikTok": {
      "main": [
        [
          {
            "node": "Post to Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create AI video": {
      "main": [
        [
          {
            "node": "Wait for render",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for render": {
      "main": [
        [
          {
            "node": "Get AI video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate caption": {
      "main": [
        [
          {
            "node": "Post to TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Facebook": {
      "main": [
        [
          {
            "node": "Post to X",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate caption",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Post to Instagram": {
      "main": [
        [
          {
            "node": "Post to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive content idea via Telegram": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}