{
  "id": "AGudl5lo5u76NXNU",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Create low-cost AI videos with Veo 3.1 Fast and upload to YouTube & TikTok with Blotato",
  "tags": [],
  "nodes": [
    {
      "id": "2eb728ab-adeb-48f6-a423-2d7b203c6352",
      "name": "Receive idea from Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        832,
        -704
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5e86fa5a-c3ed-4ca3-b8da-bf2cd556be1e",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        1056,
        -704
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "atlas_model",
              "type": "string",
              "value": "google/veo3.1-fast/text-to-video"
            },
            {
              "id": "a2",
              "name": "video_duration",
              "type": "number",
              "value": 8
            },
            {
              "id": "a3",
              "name": "video_prompt",
              "type": "string",
              "value": "={{ $('Receive idea from Telegram').item.json.message.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "60030045-5f6d-440f-8da7-be09ce331712",
      "name": "Create video on AtlasCloud",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        -704
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"{{ $json.atlas_model }}\",\n  \"prompt\": {{ JSON.stringify($json.video_prompt) }},\n  \"duration\": {{ $json.video_duration }}\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8bfc6fc6-9099-4158-9b9a-9e285a080576",
      "name": "Wait for rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        1504,
        -704
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "c0b7caed-fdcd-45c7-9f94-b15eaf479500",
      "name": "Get render status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1712,
        -704
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Create video on AtlasCloud').item.json.data.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c02ffacd-c142-44f5-9a32-5c965c6d2cf5",
      "name": "Video ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        1936,
        -704
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "c1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            },
            {
              "id": "c2",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0c1c92d7-64dd-4b37-90c0-0d3b7759b093",
      "name": "Generate title with GPT",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        832,
        -320
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a social media SEO expert specialized in creating engaging, optimized titles for short videos.\n\nYour task: generate ONE effective title for a YouTube/TikTok video based on the user video description.\n\nGUIDELINES:\n- Maximum 60 characters to avoid truncation\n- Use relevant keywords for SEO\n- Make it catchy and clickable, without misleading clickbait\n- Use numbers, questions, or power words when appropriate\n- IMPORTANT: write the title in the SAME language as the input description\n\nOUTPUT FORMAT: provide only the title, no explanations, no quotes."
            },
            {
              "content": "=Input: {{ $('Configuration').item.json.video_prompt }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "0ca8a1b0-bc83-4529-bf35-d29794000c8d",
      "name": "Send confirmation on Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1936,
        -320
      ],
      "parameters": {
        "text": "=Video published.\nTitle: {{ $('Generate title with GPT').item.json.message.content }}\nVideo URL: {{ $('Get render status').item.json.data.outputs[0] }}",
        "chatId": "={{ $('Receive idea from Telegram').item.json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b11ec033-553b-4b64-b845-8bb39e9994c7",
      "name": "Sticky Note 79dd4acc",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -832
      ],
      "parameters": {
        "color": 3,
        "width": 820,
        "height": 1004,
        "content": "# Create low-cost AI videos with Veo 3.1 Fast and upload to YouTube & TikTok with Blotato\n\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Support-de-cours-G-n-rer-des-vid-os-IA-Veo-3-1-Fast-et-publier-sur-YouTube-TikTok-depuis-Teleg-3883d6550fd981688380e402d010276f?source=copy_link)\n\nSend a video idea to your Telegram bot and this workflow turns it into a finished short video, then publishes it to YouTube and TikTok. Video generation uses Google Veo 3.1 Fast via [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) (native audio included), titles are written by GPT, and publishing is handled by [Blotato](https://blotato.com/?ref=firas).\n\n## How it works\n1. **Receive idea from Telegram** \u2014 message your bot with the prompt of the video.\n2. **Configuration** \u2014 one Set node holds the variables you can edit (model, duration).\n3. **Generate the video** \u2014 AtlasCloud (Veo 3.1 Fast) renders the clip; the workflow polls every 30s until it is ready.\n4. **Create a title** \u2014 GPT writes a short, SEO-friendly title in the language of your prompt.\n5. **Publish** \u2014 Blotato posts the video to YouTube and TikTok, then you get a Telegram confirmation.\n\n## Requirements\n- An [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) API key (Veo 3.1 Fast costs about $0.10\u2013$0.15 per second of video).\n- A Blotato account with YouTube and TikTok connected, plus the official Blotato community node installed.\n- An OpenAI API key and a Telegram bot token.\n- This template uses the Blotato community node, so it runs on self-hosted n8n (or n8n Cloud with verified community nodes enabled).\n\n## Setup\n1. Create a Telegram bot with @BotFather and add its token as Telegram credentials on both Telegram nodes.\n2. Add your AtlasCloud key as Header Auth (Name: Authorization, Value: Bearer YOUR_KEY) on the two AtlasCloud HTTP nodes.\n3. Add your OpenAI key on the title node.\n4. In the two Blotato nodes, select your Blotato credential and pick your YouTube and TikTok accounts.\n\n## Customization\n- Change video length or model in the Configuration node.\n- Edit the GPT system prompt to change the title style.\n- Set YouTube privacy or TikTok options inside each Blotato node."
      },
      "typeVersion": 1
    },
    {
      "id": "6abbc26a-91d7-4245-833c-1d40f0fe3c91",
      "name": "Sticky Note 6cce4021",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -816
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 280,
        "content": "## 1) Receive the idea and configure\nMessage your Telegram bot, then set the model and duration here."
      },
      "typeVersion": 1
    },
    {
      "id": "40041c1e-2e39-4139-9a23-35e48561bc5e",
      "name": "Sticky Note cb0d9328",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        -816
      ],
      "parameters": {
        "color": 7,
        "width": 900,
        "height": 280,
        "content": "## 2) Generate the video with Veo 3.1 Fast (AtlasCloud)\nCreate the render, then poll the status until it is completed."
      },
      "typeVersion": 1
    },
    {
      "id": "a78f44d9-2b60-4809-a880-9ea945ed42e6",
      "name": "Sticky Note b6d0d570",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -448
      ],
      "parameters": {
        "color": 7,
        "width": 1400,
        "height": 340,
        "content": "## 3) Create a title and publish (Blotato)\nGenerate a title, publish to YouTube and TikTok, then confirm on Telegram."
      },
      "typeVersion": 1
    },
    {
      "id": "5283cfdd-deec-420f-a05b-28f2773f8188",
      "name": "Publish to YouTube via Blotato",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        1360,
        -320
      ],
      "parameters": {
        "options": {},
        "platform": "youtube",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "8047",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/8047",
          "cachedResultName": "DR FIRASS (Dr. Firas)"
        },
        "postContentText": "={{ $('Generate title with GPT').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Get render status').item.json.data.outputs[0] }}",
        "postCreateYoutubeOptionTitle": "={{ $('Generate title with GPT').item.json.message.content }}",
        "postCreateYoutubeOptionContainsSyntheticMedia": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5fb66b32-7456-4c3c-ad94-51e9b67b4fd2",
      "name": "Publish to TikTok via Blotato",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueRegularOutput",
      "position": [
        1616,
        -320
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "2079",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/2079",
          "cachedResultName": "elitecybzcs"
        },
        "postContentText": "={{ $('Generate title with GPT').item.json.message.content }}",
        "postContentMediaUrls": "={{ $('Get render status').item.json.data.outputs[0] }}",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "fc97f173-79d5-4b7c-9e6c-544baf1949d8",
  "nodeGroups": [],
  "connections": {
    "Video ready?": {
      "main": [
        [
          {
            "node": "Generate title with GPT",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration": {
      "main": [
        [
          {
            "node": "Create video on AtlasCloud",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get render status": {
      "main": [
        [
          {
            "node": "Video ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for rendering": {
      "main": [
        [
          {
            "node": "Get render status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate title with GPT": {
      "main": [
        [
          {
            "node": "Publish to YouTube via Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create video on AtlasCloud": {
      "main": [
        [
          {
            "node": "Wait for rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive idea from Telegram": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to TikTok via Blotato": {
      "main": [
        [
          {
            "node": "Send confirmation on Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to YouTube via Blotato": {
      "main": [
        [
          {
            "node": "Publish to TikTok via Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}