{
  "id": "5nsm5bSwDEZ4ZoTQ",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Turn web articles into AI videos with Seedance 2.0 and publish to TikTok, Instagram and YouTube",
  "tags": [],
  "nodes": [
    {
      "id": "b7ced1cb-7752-4efb-8ea6-37e8a102a2ef",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        576
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "source_url",
              "type": "string",
              "value": "={{ $json.message.text }}"
            },
            {
              "id": "a2",
              "name": "seedance_model",
              "type": "string",
              "value": "bytedance/seedance-2.0/text-to-video"
            },
            {
              "id": "a3",
              "name": "video_duration",
              "type": "number",
              "value": "5"
            },
            {
              "id": "a4",
              "name": "video_width",
              "type": "number",
              "value": "720"
            },
            {
              "id": "a5",
              "name": "video_height",
              "type": "number",
              "value": "1280"
            },
            {
              "id": "a6",
              "name": "video_fps",
              "type": "number",
              "value": "24"
            },
            {
              "id": "a7",
              "name": "output_language",
              "type": "string",
              "value": "English"
            },
            {
              "id": "a8",
              "name": "wait_seconds",
              "type": "number",
              "value": "30"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1f90391c-b2c4-4211-8d09-4c194f8e9def",
      "name": "Read web link content",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        576
      ],
      "parameters": {
        "jsCode": "const cfg = $input.first().json;\nconst source_url = (cfg.source_url || '').toString().trim();\nlet page_content = '';\nif (source_url) {\n  try {\n    const res = await this.helpers.httpRequest({ url: source_url, method: 'GET', headers: { 'User-Agent': 'Mozilla/5.0 (compatible; n8n)' }, timeout: 15000 });\n    const raw = typeof res === 'string' ? res : JSON.stringify(res);\n    page_content = raw\n      .replace(/<script[\\s\\S]*?<\\/script>/gi, ' ')\n      .replace(/<style[\\s\\S]*?<\\/style>/gi, ' ')\n      .replace(/<[^>]+>/g, ' ')\n      .replace(/&nbsp;/gi, ' ')\n      .replace(/\\s+/g, ' ')\n      .trim()\n      .slice(0, 4000);\n  } catch (e) {\n    page_content = '';\n  }\n}\nreturn [{ json: Object.assign({}, cfg, { source_url, page_content }) }];"
      },
      "typeVersion": 2
    },
    {
      "id": "52484b08-9c18-4d06-8469-37d42b9788bf",
      "name": "Generate prompt and captions",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        656,
        576
      ],
      "parameters": {
        "text": "={{ $('Configuration').item.json.source_url }}{{ $json.page_content ? '\\n\\n---\\nContent extracted from the page:\\n' + $json.page_content : '' }}",
        "options": {
          "systemMessage": "=You are an expert AI video content strategist for short-form vertical video (TikTok, Instagram Reels, YouTube Shorts) and a text-to-video prompt engineer for Seedance 2.0 by ByteDance.\n\nYou receive a web page URL plus extracted text. Find the single key idea then produce ALL of the following as structured JSON:\n\n1. video_prompt: ONE cinematic Seedance 2.0 prompt in English, under 200 characters. Describe subject, action, setting, camera move, lighting, mood. No text, no real people, no logos.\n2. tiktok_caption: hook-driven, written in {{ $('Configuration').item.json.output_language }}, MAX 3 hashtags.\n3. instagram_caption: aesthetic, written in {{ $('Configuration').item.json.output_language }}, MAX 3 hashtags.\n4. youtube_title: max 60 chars, written in {{ $('Configuration').item.json.output_language }}, SEO-friendly.\n5. youtube_description: max 200 chars, written in {{ $('Configuration').item.json.output_language }}, 1-2 keywords.\n\nReturn only the structured output."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "c4fa4217-ff3c-43e6-a0b1-4e7d56bfccf4",
      "name": "OpenAI chat model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        768
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {},
        "responsesApiEnabled": false
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "2eb959cc-95a4-4d8e-b767-260f76362269",
      "name": "Parse content as JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        752,
        784
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"video_prompt\": \"Cinematic slow push-in on a glowing futuristic city skyline at dusk, neon reflections, volumetric light\",\n  \"tiktok_caption\": \"The future is moving faster than you think #ai #tech #future\",\n  \"instagram_caption\": \"A glimpse of what comes next #aiart #cinematic #future\",\n  \"youtube_title\": \"The AI shift nobody saw coming\",\n  \"youtube_description\": \"A cinematic AI-generated short. Made with Seedance 2.0. #shorts #ai\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "6c82c2c4-9563-4d1a-9859-97b6121c28d8",
      "name": "Submit video to Seedance",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1024,
        576
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": {{ JSON.stringify($(\"Configuration\").item.json.seedance_model) }},\n  \"prompt\": {{ JSON.stringify($(\"Generate prompt and captions\").item.json.output.video_prompt) }},\n  \"duration\": {{ $(\"Configuration\").item.json.video_duration }},\n  \"width\": {{ $(\"Configuration\").item.json.video_width }},\n  \"height\": {{ $(\"Configuration\").item.json.video_height }},\n  \"fps\": {{ $(\"Configuration\").item.json.video_fps }}\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.4
    },
    {
      "id": "c6a8c4f3-0b23-48c6-a03e-3e7b79ebb3a8",
      "name": "Wait for video",
      "type": "n8n-nodes-base.wait",
      "position": [
        1216,
        576
      ],
      "parameters": {
        "amount": "={{ $('Configuration').item.json.wait_seconds }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "20d02424-dedc-4503-98c9-1f5a80099cd0",
      "name": "Get video status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1408,
        576
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Submit video to Seedance').item.json.data.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "ec4404b2-b445-4a4b-ad94-32db445c314d",
      "name": "Is video ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        1648,
        576
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": false,
            "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": "887ccc15-f453-461a-a18e-78f81c5bc33b",
      "name": "Collect video and captions",
      "type": "n8n-nodes-base.set",
      "position": [
        2016,
        560
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b1",
              "name": "video_url",
              "type": "string",
              "value": "={{ $json.data.outputs[0] }}"
            },
            {
              "id": "b2",
              "name": "tiktok_caption",
              "type": "string",
              "value": "={{ $('Generate prompt and captions').item.json.output.tiktok_caption }}"
            },
            {
              "id": "b3",
              "name": "instagram_caption",
              "type": "string",
              "value": "={{ $('Generate prompt and captions').item.json.output.instagram_caption }}"
            },
            {
              "id": "b4",
              "name": "youtube_title",
              "type": "string",
              "value": "={{ $('Generate prompt and captions').item.json.output.youtube_title }}"
            },
            {
              "id": "b5",
              "name": "youtube_description",
              "type": "string",
              "value": "={{ $('Generate prompt and captions').item.json.output.youtube_description }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4c7ecee3-2598-4990-86df-e01d15c12ba0",
      "name": "Publish on TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2240,
        560
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "9332",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/9332",
          "cachedResultName": "docteur.firas"
        },
        "postContentText": "={{ $('Collect video and captions').item.json.tiktok_caption }}",
        "postContentMediaUrls": "={{ $('Collect video and captions').item.json.video_url }}",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "49c0c7d6-fe38-46b6-bb17-f46178bb072d",
      "name": "Publish on Instagram",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2480,
        560
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1687",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1687",
          "cachedResultName": "acces.a.vie"
        },
        "postContentText": "={{ $('Collect video and captions').item.json.instagram_caption }}",
        "postContentMediaUrls": "={{ $('Collect video and captions').item.json.video_url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "445c2668-8e8b-4df6-80cc-094a42e262af",
      "name": "Publish on YouTube",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2672,
        560
      ],
      "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": "={{ $('Collect video and captions').item.json.youtube_description }}",
        "postContentMediaUrls": "={{ $('Collect video and captions').item.json.video_url }}",
        "postCreateYoutubeOptionTitle": "={{ $('Collect video and captions').item.json.youtube_title }}",
        "postCreateYoutubeOptionContainsSyntheticMedia": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "10029bf1-51f1-42a7-bad4-92dd45267555",
      "name": "Sticky Note 806f1ca4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        96
      ],
      "parameters": {
        "width": 760,
        "height": 1376,
        "content": "# Turn web articles into AI videos with Seedance 2.0 and publish to TikTok, Instagram and YouTube\n\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Turn-web-articles-into-AI-videos-with-Seedance-2-0-and-publish-to-TikTok-Instagram-and-YouTube-EN-3893d6550fd9815c9c4bd0b679d7ec68)\n\nSend a link to any article or blog post via Telegram. An AI agent reads the page, writes a cinematic Seedance 2.0 video prompt plus platform captions, [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) generates a short vertical video with native audio, and [Blotato](https://blotato.com/?ref=firas) auto-publishes it to TikTok, Instagram and YouTube. A confirmation message is sent back to Telegram.\n\n> \u26a0\ufe0f Uses the [Blotato](https://blotato.com/?ref=firas) community node: requires n8n self-hosted or n8n Cloud with Verified Community Nodes enabled.\n\n## How it works\n1. You send a URL to your Telegram bot.\n2. The **Configuration** node captures the URL and holds every setting: Seedance model, video duration, resolution and output language.\n3. A Code node fetches the web page and strips the HTML into clean text.\n4. An AI agent (OpenAI) reads the page content and returns structured JSON: a Seedance prompt + a TikTok caption + an Instagram caption + a YouTube title and description.\n5. The prompt is sent to the [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) Seedance 2.0 API. A Wait \u2192 Get status \u2192 IF loop polls until the video is ready.\n6. A Set node collects the video URL and all captions.\n7. Three [Blotato](https://blotato.com/?ref=firas) nodes publish the video to TikTok, Instagram and YouTube.\n8. A confirmation message with the video link is sent back to Telegram.\n\n## Setup\n1. **Telegram**: create a bot with @BotFather, add the Bot Token as a Telegram credential, connect it to the trigger and the confirmation node.\n2. **OpenAI**: connect your \"OpenAI account\" credential to the chat model sub-node.\n3. **[AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE)**: create an account, generate an API key, create an HTTP Header Auth credential (Name: `Authorization`, Value: `Bearer YOUR_KEY`). After import, **manually select it** on the two AtlasCloud HTTP nodes.\n4. **[Blotato](https://blotato.com/?ref=firas)**: install the community node, connect your TikTok, Instagram and YouTube accounts, then pick your account in each Blotato node.\n5. Activate the workflow and send a URL to your bot.\n\n## Requirements\n- n8n self-hosted, or n8n Cloud with Verified Community Nodes\n- A Telegram bot token (free, via @BotFather)\n- An OpenAI API key\n- An [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) API key (Seedance 2.0 video \u2248 $0.09\u20130.15/s)\n- A [Blotato](https://blotato.com/?ref=firas) account with TikTok, Instagram and YouTube connected\n\n## Customization\n- Switch model to `bytedance/seedance-2.0-fast/text-to-video` (cheaper, faster) in **Configuration**.\n- Change `video_duration`, `video_width`/`video_height` (720\u00d71280 = vertical 9:16), `output_language`.\n- Edit the agent system message to change tone or hashtag rules.\n- Add a manual approval step (Wait form) before the Blotato nodes.\n- Add platforms by duplicating a Blotato node."
      },
      "typeVersion": 1
    },
    {
      "id": "ec6badac-9d86-4732-af5a-18cbb15cd931",
      "name": "Sticky Note da818d5e",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 488,
        "content": "## 1. Receive URL and settings\nTelegram trigger receives a URL, then the **Configuration** node captures it and holds the Seedance model, video size and output language. Edit settings here."
      },
      "typeVersion": 1
    },
    {
      "id": "db370f02-d1fb-4b98-9743-b95357152c10",
      "name": "Sticky Note 9c8ec2b6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 620,
        "height": 488,
        "content": "## 2. AI prompt and captions\nA Code node fetches the page, then an OpenAI agent returns structured JSON: a cinematic video prompt + captions for TikTok, Instagram and YouTube."
      },
      "typeVersion": 1
    },
    {
      "id": "07a08e34-cca5-4a59-9a13-e6f1579bd305",
      "name": "Sticky Note fe84685a",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 980,
        "height": 488,
        "content": "## 3. Generate the video \u2014 [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) (Seedance 2.0)\nSubmit the prompt, then poll every 30s until the MP4 is ready.\n\u26a0\ufe0f After import, manually select the AtlasCloud API credential on both HTTP nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "958b8b2e-aba6-4d17-99a8-2380c67ca28b",
      "name": "Sticky Note c98b4b60",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        224
      ],
      "parameters": {
        "color": 7,
        "width": 1280,
        "height": 488,
        "content": "## 4. Publish \u2014 [Blotato](https://blotato.com/?ref=firas) + confirmation\nCollect the video URL and captions, then publish to TikTok, Instagram and YouTube. A confirmation is sent back to Telegram. Pick your connected account in each [Blotato](https://blotato.com/?ref=firas) node."
      },
      "typeVersion": 1
    },
    {
      "id": "aa8b0e0f-8fde-4fc1-93b3-f24061f6366c",
      "name": "Receive URL on Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -192,
        576
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "963f4140-18ad-45ad-98cf-3861840f894b",
      "name": "Send confirmation on Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2912,
        560
      ],
      "parameters": {
        "text": "=\u2705 Video published!\n\n\ud83c\udfa5 {{ $('Collect video and captions').item.json.youtube_title }}\n\n\u27a1\ufe0f TikTok, Instagram and YouTube done.\n\ud83d\udcce {{ $('Collect video and captions').item.json.video_url }}",
        "chatId": "={{ $('Receive URL on Telegram').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "463a2db0-e69b-4f39-a7e5-3542e61c00e2",
  "nodeGroups": [],
  "connections": {
    "Configuration": {
      "main": [
        [
          {
            "node": "Read web link content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for video": {
      "main": [
        [
          {
            "node": "Get video status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is video ready?": {
      "main": [
        [
          {
            "node": "Collect video and captions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get video status": {
      "main": [
        [
          {
            "node": "Is video ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI chat model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate prompt and captions",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Publish on TikTok": {
      "main": [
        [
          {
            "node": "Publish on Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish on YouTube": {
      "main": [
        [
          {
            "node": "Send confirmation on Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish on Instagram": {
      "main": [
        [
          {
            "node": "Publish on YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse content as JSON": {
      "ai_outputParser": [
        [
          {
            "node": "Generate prompt and captions",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Read web link content": {
      "main": [
        [
          {
            "node": "Generate prompt and captions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive URL on Telegram": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit video to Seedance": {
      "main": [
        [
          {
            "node": "Wait for video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect video and captions": {
      "main": [
        [
          {
            "node": "Publish on TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate prompt and captions": {
      "main": [
        [
          {
            "node": "Submit video to Seedance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}