{
  "id": "DJmlxy3tyTPEHgQz",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Generate videos from images with Seedance 2 and publish to TikTok and YouTube",
  "tags": [],
  "nodes": [
    {
      "id": "d255898d-31df-47b5-8f2a-7255e1836598",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        544,
        -272
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {
          "download": true,
          "imageSize": "large"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "e529cdd0-32ac-42a8-ac1f-9d60b66b43bf",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        736,
        -272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cfg-model",
              "name": "atlas_model",
              "type": "string",
              "value": "bytedance/seedance-2.0/image-to-video"
            },
            {
              "id": "cfg-prompt",
              "name": "video_prompt",
              "type": "string",
              "value": "={{ $('Telegram Trigger').item.json.message.caption }}"
            },
            {
              "id": "cfg-duration",
              "name": "video_duration",
              "type": "number",
              "value": 5
            },
            {
              "id": "cfg-resolution",
              "name": "resolution",
              "type": "string",
              "value": "720p"
            },
            {
              "id": "cfg-aspect",
              "name": "aspect_ratio",
              "type": "string",
              "value": "9:16"
            },
            {
              "id": "cfg-fps",
              "name": "fps",
              "type": "number",
              "value": 24
            },
            {
              "id": "cfg-poll",
              "name": "poll_interval",
              "type": "number",
              "value": 15
            },
            {
              "id": "cfg-chat",
              "name": "telegram_chat_id",
              "type": "string",
              "value": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e77e1a2f-fc90-480c-9e28-08384864a1a2",
      "name": "Upload Image to AtlasCloud",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1088,
        -272
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/uploadMedia",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "382b7513-bfee-4c57-8a21-60563f74f3b4",
      "name": "Submit Video Generation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1312,
        -272
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"{{ $('Configuration').item.json.atlas_model }}\",\n  \"prompt\": {{ JSON.stringify($('Configuration').item.json.video_prompt) }},\n  \"image\": \"{{ $('Upload Image to AtlasCloud').item.json.data.download_url }}\",\n  \"duration\": {{ $('Configuration').item.json.video_duration }},\n  \"resolution\": \"{{ $('Configuration').item.json.resolution }}\",\n  \"aspect_ratio\": \"{{ $('Configuration').item.json.aspect_ratio }}\",\n  \"fps\": {{ $('Configuration').item.json.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": "0efebcd2-12b8-441a-966a-f668e0bfb24d",
      "name": "Wait for Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        1616,
        -272
      ],
      "parameters": {
        "amount": "={{ $('Configuration').item.json.poll_interval }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "10d10703-c31d-45e5-a382-4b8af604a789",
      "name": "Check Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1776,
        -272
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Submit Video Generation').item.json.data.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "09d5ceae-1078-4b2d-b5be-cc1e9a781a3d",
      "name": "Video Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        1920,
        -272
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "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.3
    },
    {
      "id": "87c36117-f3c3-40ee-b7da-5be3f87a14ba",
      "name": "Generate Video Title",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2144,
        -288
      ],
      "parameters": {
        "text": "={{ $('Configuration').item.json.video_prompt }}",
        "options": {
          "systemMessage": "You are a Video SEO expert. Generate ONE catchy, optimized title for a short vertical video based on the input description.\n\nRules:\n- Max 60 characters\n- Use relevant keywords\n- Catchy and clickable, no misleading clickbait\n- Generate the title in the SAME language as the input\n- Output ONLY the title, nothing else."
        },
        "promptType": "define"
      },
      "typeVersion": 3.1
    },
    {
      "id": "88cf5d5b-655a-434f-9e28-86b0baccdb06",
      "name": "OpenAI Title Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2144,
        -80
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "aa377836-c47b-430e-8d87-7d49f03f945a",
      "name": "Publish to YouTube",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2416,
        -288
      ],
      "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 Video Title').item.json.output }}",
        "postContentMediaUrls": "={{ $('Check Video Status').item.json.data.outputs[0] }}",
        "postCreateYoutubeOptionTitle": "={{ $('Generate Video Title').item.json.output }}",
        "postCreateYoutubeOptionContainsSyntheticMedia": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "cbb930cd-332c-4902-b7f0-2c726e3ef0bc",
      "name": "Publish to TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2560,
        -288
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "9332",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/9332",
          "cachedResultName": "docteur.firas"
        },
        "postContentText": "={{ $('Generate Video Title').item.json.output }}",
        "postContentMediaUrls": "={{ $('Check Video Status').item.json.data.outputs[0] }}",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "43c5447b-f01a-4a96-afc5-2a83f0ba7e34",
      "name": "Notify on Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2688,
        -288
      ],
      "parameters": {
        "text": "=Your Seedance video is published!\n\nTitle: {{ $('Generate Video Title').item.json.output }}\nVideo: {{ $('Check Video Status').item.json.data.outputs[0] }}",
        "chatId": "={{ $('Configuration').item.json.telegram_chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0965b11b-22e2-486a-8ceb-6ed7eaa67d25",
      "name": "Sticky Note b508bc46",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -512
      ],
      "parameters": {
        "width": 760,
        "height": 1080,
        "content": "# Generate videos from images with Seedance 2 and publish to TikTok and YouTube\n\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Generate-videos-from-images-with-Seedance-2-and-publish-to-TikTok-and-YouTube-Course-support-EN-3983d6550fd981cf93a0e58a970e4bf1)\n\n## How it works\nSend a photo with a caption to your Telegram bot. The caption becomes the animation prompt. The workflow uploads the image to [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE), generates a video with ByteDance Seedance 2.0 (image-to-video), polls until rendering is done, writes an SEO title with OpenAI, then publishes the video to YouTube and TikTok through [Blotato](https://blotato.com/?ref=firas) and sends a Telegram confirmation.\n\n## Setup\n1. Telegram: connect your bot credential on the trigger and the notify node, then send the bot a photo with a caption to test.\n2. AtlasCloud: create an Header Auth credential (Name: Authorization, Value: Bearer YOUR_KEY) and select it manually on the three AtlasCloud HTTP nodes (Upload, Submit, Status). Get your key on [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE).\n3. OpenAI: select your OpenAI credential on the title model.\n4. Blotato: select your Blotato account on the two publish nodes and pick the YouTube and TikTok accounts in each dropdown.\n5. Open the Configuration node to adjust model, duration, resolution, aspect ratio, fps and poll interval.\n\n## Requirements\n- n8n self-hosted, or n8n Cloud with Verified Community Nodes enabled (Blotato is a community node).\n- Telegram bot, AtlasCloud API key, OpenAI API key, and a paid Blotato account.\n\n## Customization\n- Change atlas_model in Configuration to any Seedance 2.0 variant (Fast or Mini) for lower cost or faster speed.\n- Adjust video_duration, resolution and aspect_ratio for different formats.\n- Add or remove target platforms on the Blotato nodes.\n\nNote: Blotato is a community node, so it does not render in the catalogue preview. Attach a workflow screenshot when submitting. Seedance 2.0 image-to-video costs about 0.10 to 0.15 USD per second of video."
      },
      "typeVersion": 1
    },
    {
      "id": "b38620de-5cb3-4a84-b298-86f7325bd2ee",
      "name": "Sticky Note ca773d31",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 420,
        "content": "## 1. Receive image and settings\nSend a photo and caption to the Telegram bot. The Configuration node centralizes every adjustable variable."
      },
      "typeVersion": 1
    },
    {
      "id": "562e5e05-f998-4a2b-ad44-6afd1fd0dfb5",
      "name": "Sticky Note 81df1d4f",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 420,
        "content": "## 2. Generate the video\nUpload the first-frame image to [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE), then start a Seedance 2.0 image-to-video job."
      },
      "typeVersion": 1
    },
    {
      "id": "b0ae0f82-6a79-472a-a6d2-8018e8e39efb",
      "name": "Sticky Note ee2deea7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 516,
        "height": 424,
        "content": "## 3. Wait for rendering\nPoll AtlasCloud every few seconds until the prediction status is completed, then continue."
      },
      "typeVersion": 1
    },
    {
      "id": "09ff0244-b0f0-4d4d-b918-400c108199f0",
      "name": "Sticky Note 59fd7395",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 740,
        "height": 436,
        "content": "## 4. Title and publish\nWrite an SEO title with OpenAI, publish to YouTube and TikTok via [Blotato](https://blotato.com/?ref=firas), and confirm on Telegram."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "a0e6b8ed-8b9b-44b1-95ac-bfaf3658f0cf",
  "nodeGroups": [],
  "connections": {
    "Video Ready?": {
      "main": [
        [
          {
            "node": "Generate Video Title",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration": {
      "main": [
        [
          {
            "node": "Upload Image to AtlasCloud",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to TikTok": {
      "main": [
        [
          {
            "node": "Notify on Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Status": {
      "main": [
        [
          {
            "node": "Video Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Title Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Video Title",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Publish to YouTube": {
      "main": [
        [
          {
            "node": "Publish to TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Rendering": {
      "main": [
        [
          {
            "node": "Check Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Title": {
      "main": [
        [
          {
            "node": "Publish to YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video Generation": {
      "main": [
        [
          {
            "node": "Wait for Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to AtlasCloud": {
      "main": [
        [
          {
            "node": "Submit Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}