{
  "id": "4JhGRfjqNN9nw0wA",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Generate Funny AI videos with Seedance 2.0 and auto-publish to TikTok, Instagram and YouTube with Blotato",
  "tags": [],
  "nodes": [
    {
      "id": "0c6a492d-77d9-4ab2-8c63-325bfa3c1b50",
      "name": "Receive Idea on Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        960,
        368
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "46bb3405-14d6-49fc-b412-73c5455278b9",
      "name": "Generate Prompt and Captions",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1280,
        368
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are an expert AI video content strategist specializing in short-form video for TikTok, Instagram, and YouTube Shorts, and in text-to-video prompt engineering for Seedance 2.0 by ByteDance.\n\nGiven the user video idea, produce ALL of the following:\n1. video_prompt: an optimized prompt for Seedance 2.0. Cinematic and highly specific, under 200 characters. Describe subject, action, environment, lighting and mood. Use cinematic terms (slow pan, close-up, golden hour, soft bokeh, dramatic lighting). Avoid negative phrases.\n2. tiktok_caption: trend-aware, engaging, MAX 3 hashtags.\n3. instagram_caption: aesthetic, evocative, MAX 3 hashtags.\n4. youtube_title: max 60 characters, SEO-friendly, no clickbait.\n5. youtube_description: max 200 characters, includes 1-2 keywords.\n\nWrite captions in the same language as the user idea. Return only the structured JSON, nothing else."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "bb632901-b20b-4907-9b93-1314addfaade",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1248,
        592
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "1a91db31-e653-409e-b6c2-93e1d91742de",
      "name": "Parse Content as JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1504,
        592
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"video_prompt\": \"Cinematic slow pan of a lone samurai walking through neon-lit Tokyo streets in the rain at night, soft bokeh, dramatic reflections, moody atmosphere\",\n  \"tiktok_caption\": \"When the city never sleeps and neither do you \ud83c\udf03 #neon #tokyo #ai\",\n  \"instagram_caption\": \"Lost in the neon glow of a rainy Tokyo night \u2728 #cinematic #moody #aiart\",\n  \"youtube_title\": \"Neon Tokyo Rain - AI Cinematic Short\",\n  \"youtube_description\": \"A cinematic AI-generated walk through neon Tokyo. Made with Seedance 2.0. #shorts #ai\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9a9e75af-15c6-4578-a673-580ee538ba45",
      "name": "Submit Video to Seedance",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        912
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"bytedance/seedance-2.0/text-to-video\",\n  \"prompt\": {{ JSON.stringify($json.video_prompt) }},\n  \"duration\": 5\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": "b6066463-d5e0-489b-9dce-b09570589759",
      "name": "Wait 30 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        1184,
        912
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "34905e79-1a43-4857-af07-4d0b5c62b9f7",
      "name": "Get Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1360,
        912
      ],
      "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": "626412ac-be37-4a39-a53a-44c94e5afb35",
      "name": "Is Video Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        912
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "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.3
    },
    {
      "id": "9484a527-ca8f-44f2-bdfe-e6c186b424cd",
      "name": "Collect Video and Captions",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        1296
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "video_url",
              "type": "string",
              "value": "={{ $json.data.outputs[0] }}"
            },
            {
              "id": "a2",
              "name": "tiktok_caption",
              "type": "string",
              "value": "={{ $('Generate Prompt and Captions').item.json.tiktok_caption }}"
            },
            {
              "id": "a3",
              "name": "instagram_caption",
              "type": "string",
              "value": "={{ $('Generate Prompt and Captions').item.json.instagram_caption }}"
            },
            {
              "id": "a4",
              "name": "youtube_title",
              "type": "string",
              "value": "={{ $('Generate Prompt and Captions').item.json.youtube_title }}"
            },
            {
              "id": "a5",
              "name": "youtube_description",
              "type": "string",
              "value": "={{ $('Generate Prompt and Captions').item.json.youtube_description }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1e122910-42bc-44ca-81ac-fed449d9a2b6",
      "name": "Publish on TikTok",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1056,
        1296
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "2079",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/2079",
          "cachedResultName": "elitecybzcs"
        },
        "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": "f4bc5ee5-9e9e-48c7-b5cc-e2ffb59f840a",
      "name": "Publish on Instagram",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1312,
        1296
      ],
      "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": "60a27a3e-16e8-41f3-a522-d4bf55d36a51",
      "name": "Publish on YouTube",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1552,
        1296
      ],
      "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": "b427233b-6283-4205-b554-ea944dd0ba6c",
      "name": "Send Confirmation",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1872,
        1296
      ],
      "parameters": {
        "text": "=Video published!\n\n{{ $('Collect Video and Captions').item.json.youtube_title }}\n\nTikTok, Instagram and YouTube done. Generated with Seedance 2.0.",
        "chatId": "={{ $('Receive Idea on Telegram').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ce264beb-c9cf-4f41-be52-21f2824c54af",
      "name": "Sticky Note 0c8a01ec",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        256
      ],
      "parameters": {
        "width": 760,
        "height": 1192,
        "content": "# Generate Funny AI videos with Seedance 2.0 and auto-publish to TikTok, Instagram and YouTube with Blotato\n\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Generate-Funny-AI-videos-with-Seedance-2-0-and-auto-publish-to-TikTok-Instagram-and-YouTube-with-Bl-3883d6550fd98140b54bddf8df59ff88)\n\nSend a funny video idea to your Telegram bot. An AI agent writes the optimized prompt and the captions, [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) generates the video with **Seedance 2.0 by ByteDance**, and [Blotato](https://blotato.com/?ref=firas) auto-publishes it to TikTok, Instagram and YouTube.\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. Telegram trigger receives your video idea as a text message.\n2. An AI agent (OpenAI) returns structured JSON: Seedance prompt + TikTok caption + Instagram caption + YouTube title + description (max 3 hashtags per caption).\n3. The prompt is sent to the AtlasCloud Seedance 2.0 API; a 30s Wait \u2192 Get status \u2192 IF loop polls until the video is ready.\n4. A Set node collects the video URL and all captions.\n5. Three Blotato nodes publish to TikTok, Instagram and YouTube.\n6. A Telegram confirmation is sent back to you.\n\n## Setup\n1. Telegram: create a bot with @BotFather, add the Bot Token as a Telegram credential on both Telegram nodes.\n2. OpenAI: connect your OpenAI credential to the chat model.\n3. AtlasCloud: create an account, generate an API key, make an HTTP Header Auth credential (Name: Authorization / Value: Bearer YOUR_KEY). After import, manually select it on the two AtlasCloud HTTP nodes.\n4. Blotato: install the community node, connect your TikTok, Instagram and YouTube accounts, then pick the account in each Blotato node.\n\n## Requirements\n- n8n self-hosted or n8n Cloud with Verified Community Nodes\n- Telegram Bot Token\n- OpenAI API key\n- AtlasCloud API key (Seedance 2.0 video generation, \u2248 $0.10\u20130.15 / second of video)\n- Blotato account with TikTok, Instagram and YouTube connected\n\n## Customization\n- Change duration (default 5s) in the Submit Video node body.\n- Edit the agent system message to change language, tone or hashtag count.\n- Add platforms by duplicating a Blotato node."
      },
      "typeVersion": 1
    },
    {
      "id": "6f274186-5cc7-4f77-9dd9-62dc54827e80",
      "name": "Sticky Note 57c4fe4a",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        240
      ],
      "parameters": {
        "color": 7,
        "width": 1248,
        "height": 264,
        "content": "## 1-2. Idea \u2192 AI content\nTelegram trigger + AI agent returning structured JSON (prompt + captions + YouTube title/description)."
      },
      "typeVersion": 1
    },
    {
      "id": "4250bdd2-1f13-4094-a99b-aaedd3b34f6a",
      "name": "Sticky Note e0002118",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 1264,
        "height": 328,
        "content": "## 3. Video generation \u2014 AtlasCloud (Seedance 2.0)\nSubmit, then poll every 30s until ready.\n\u26a0\ufe0f After import, manually select the AtlasCloud API credential on both HTTP nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "d2dfc873-15f3-46de-9c4b-6b7b65d9bdf1",
      "name": "Sticky Note 646aa33a",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        1168
      ],
      "parameters": {
        "color": 7,
        "width": 1264,
        "height": 312,
        "content": "## 4. Publish \u2014 Blotato\nCollect the video URL + captions, then publish to TikTok, Instagram and YouTube. Pick your account in each node."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "d42d3743-bf33-4602-a12f-567b40523450",
  "nodeGroups": [],
  "connections": {
    "Is Video Ready?": {
      "main": [
        [
          {
            "node": "Collect Video and Captions",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 Seconds": {
      "main": [
        [
          {
            "node": "Get Video Status",
            "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",
            "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
          }
        ]
      ]
    },
    "Receive Idea on Telegram": {
      "main": [
        [
          {
            "node": "Generate Prompt and Captions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video to Seedance": {
      "main": [
        [
          {
            "node": "Wait 30 Seconds",
            "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
          }
        ]
      ]
    }
  }
}