{
  "id": "lwI30Vsju7Pc8BS8",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Create UGC video with OpenAI and AtlasCloud Seedance, publish to Instagram via Blotato",
  "tags": [
    {
      "id": "FCJ5YztcFy5XxWUZ",
      "name": "instagram",
      "createdAt": "2026-07-16T11:16:09.522Z",
      "updatedAt": "2026-07-16T11:16:09.522Z"
    },
    {
      "id": "v1ZPcCBi3092YzVo",
      "name": "atlascloud",
      "createdAt": "2026-07-16T11:16:09.519Z",
      "updatedAt": "2026-07-16T11:16:09.519Z"
    },
    {
      "id": "wjda27JuYCdek9ot",
      "name": "ugc",
      "createdAt": "2026-07-16T11:16:09.515Z",
      "updatedAt": "2026-07-16T11:16:09.515Z"
    },
    {
      "id": "yh5MHSGdSao9Ntar",
      "name": "openai",
      "createdAt": "2026-07-14T19:34:02.344Z",
      "updatedAt": "2026-07-14T19:34:02.344Z"
    }
  ],
  "nodes": [
    {
      "id": "bfabc838-0fcc-4d46-8b0c-d1ddd7b7189b",
      "name": "When clicking Execute workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        128,
        176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "122c05a2-6d05-44a0-9c06-bd9d11503df0",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cfg-1",
              "name": "product_image_url",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Public URL of your product photo, e.g. https://your-cdn.com/product.png__>"
            },
            {
              "id": "cfg-2",
              "name": "openai_vision_model",
              "type": "string",
              "value": "gpt-4o"
            },
            {
              "id": "cfg-3",
              "name": "openai_text_model",
              "type": "string",
              "value": "gpt-4o"
            },
            {
              "id": "cfg-4",
              "name": "atlas_video_model",
              "type": "string",
              "value": "bytedance/seedance-2.0/text-to-video"
            },
            {
              "id": "cfg-5",
              "name": "video_duration_seconds",
              "type": "number",
              "value": 8
            },
            {
              "id": "cfg-6",
              "name": "video_aspect_ratio",
              "type": "string",
              "value": "9:16"
            },
            {
              "id": "cfg-7",
              "name": "instagram_caption_language",
              "type": "string",
              "value": "English"
            },
            {
              "id": "cfg-8",
              "name": "extra_creative_direction",
              "type": "string",
              "value": ""
            },
            {
              "id": "cfg-9",
              "name": "poll_interval_seconds",
              "type": "number",
              "value": 20
            },
            {
              "id": "cfg-10",
              "name": "max_poll_attempts",
              "type": "number",
              "value": 15
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "68356c22-f519-40b7-a4d5-1a092062863c",
      "name": "Analyze Product Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        496,
        176
      ],
      "parameters": {
        "text": "Describe this product photo in vivid, concrete visual detail: the product itself, packaging, colors, textures, setting, and mood. This description will brief a video director, so be specific and visual.",
        "images": {
          "values": [
            {}
          ]
        },
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Configuration').item.json.openai_vision_model }}"
        },
        "options": {},
        "resource": "image",
        "imageUrls": "={{ $('Configuration').item.json.product_image_url }}",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7896d392-18c5-4d8f-baaf-9a3e80e68094",
      "name": "Creative Director",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        672,
        176
      ],
      "parameters": {
        "images": {
          "values": [
            {}
          ]
        },
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Configuration').item.json.openai_text_model }}"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "=You are an expert advertising creative director for short-form UGC video ads. Given a product image description, write ONE vivid, cinematic scene description for a text-to-video AI model to generate a {{ $('Configuration').item.json.video_duration_seconds }}-second commercial in {{ $('Configuration').item.json.video_aspect_ratio }} aspect ratio. Describe the setting, camera style, on-screen actions, lighting, and mood in concrete visual terms. Output ONLY the scene description in plain text, no preamble, no markdown, no quotation marks."
            },
            {
              "content": "=Product image description: {{ $json.content }}\n\nAdditional creative direction from the brand (may be empty): {{ $('Configuration').item.json.extra_creative_direction }}"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "3f3d53cd-686b-442b-a8c9-8cf089ac2f88",
      "name": "Submit Video Generation Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        896,
        80
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ { \"model\": $('Configuration').item.json.atlas_video_model, \"prompt\": $('Creative Director').item.json.content, \"duration\": $('Configuration').item.json.video_duration_seconds, \"aspect_ratio\": $('Configuration').item.json.video_aspect_ratio } }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.4
    },
    {
      "id": "623fc26f-07cf-4285-a0db-c424e803eda7",
      "name": "Wait Before Polling",
      "type": "n8n-nodes-base.wait",
      "position": [
        1344,
        0
      ],
      "parameters": {
        "amount": "={{ $('Configuration').item.json.poll_interval_seconds }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "994d2640-7e51-410e-b7c4-fc01cc4d1c0d",
      "name": "Check Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1568,
        0
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Submit Video Generation Request').item.json.data.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.4
    },
    {
      "id": "e2657b0c-ccb7-468d-98ed-60bc5e09d9f2",
      "name": "Video Ready or Max Attempts?",
      "type": "n8n-nodes-base.if",
      "position": [
        1792,
        80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            },
            {
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "succeeded"
            },
            {
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": "={{ $('Configuration').item.json.max_poll_attempts }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "210feb71-e1b9-4ed6-90d1-8f831d7ed9eb",
      "name": "Video Ready",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2016,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "201ae6d4-8441-47ef-825d-77ada86583a8",
      "name": "Combine Video and Caption",
      "type": "n8n-nodes-base.merge",
      "position": [
        2240,
        176
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "69545c1f-5857-4d56-8ab9-c6e6b5eaa6ac",
      "name": "Poll Video Status Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1120,
        80
      ],
      "parameters": {
        "options": {
          "reset": true
        }
      },
      "typeVersion": 3
    },
    {
      "id": "b2d6cf33-b3a4-42c4-bca7-dda3c981a1ec",
      "name": "Write Instagram Caption",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2016,
        288
      ],
      "parameters": {
        "images": {
          "values": [
            {}
          ]
        },
        "modelId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Configuration').item.json.openai_text_model }}"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "role": "system",
              "content": "=You are an expert social media manager. Given a cinematic video scene description, write a short, compelling Instagram caption for a UGC-style product video ad, in {{ $('Configuration').item.json.instagram_caption_language }}. Include a strong hook line, 1-2 punchy sentences about the product benefit, and a short call to action. Do not include hashtags. Output ONLY the caption text."
            },
            {
              "content": "={{ $('Creative Director').item.json.content }}"
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d0c22b8c-7d1b-439f-b5e0-8b6a78dc19ef",
      "name": "Prepare Post Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2464,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "post-1",
              "name": "video_url",
              "type": "string",
              "value": "={{ $('Check Video Status').item.json.data.outputs[0] }}"
            },
            {
              "id": "post-2",
              "name": "caption_text",
              "type": "string",
              "value": "={{ $('Write Instagram Caption').item.json.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "fa66a733-0831-4eb2-9084-f928f104429d",
      "name": "Publish Instagram Reel via Blotato",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2688,
        176
      ],
      "parameters": {
        "options": {
          "instagramMediaType": "reel"
        },
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "postContentText": "={{ $json.caption_text }}",
        "postContentMediaUrls": "={{ $json.video_url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fdc246fc-fc4b-42ae-b2ae-e4312ff776a2",
      "name": "Sticky Note 6b205449",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -480
      ],
      "parameters": {
        "width": 900,
        "height": 1804,
        "content": "# Create UGC video with OpenAI and AtlasCloud Seedance, then publish to Instagram via Blotato\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Course-Create-UGC-video-with-OpenAI-and-AtlasCloud-Seedance-publish-to-Instagram-via-Blotato-39f3d6550fd981eb8559f357161ceceb)\n\n## How it works\nOne product photo in \u2192 one Instagram Reel out. OpenAI analyzes the photo and writes a cinematic video prompt, [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) Seedance 2.0 generates the video from that prompt, OpenAI writes the caption in parallel, and [Blotato](https://blotato.com/?ref=firas) publishes the finished Reel to Instagram.\n\n## Setup\n1. Open the Configuration node and set your `product_image_url`.\n2. Select your OpenAI credential (already pre-wired if you have one named \"OpenAi account\").\n3. Manually select the \"AtlasCloud API\" Header Auth credential on the 2 AtlasCloud HTTP Request nodes (auto-bind isn't supported for generic HTTP credentials).\n4. On the Blotato node, pick your connected Instagram account from the Account dropdown.\n5. Run the workflow manually to generate and publish your first Reel.\n\n## Requirements\n- An OpenAI API key with access to a vision-capable model (e.g. gpt-4o)\n- An [AtlasCloud](https://www.atlascloud.ai/?ref=8QKPJE) account and API key (Seedance 2.0 text-to-video, ~0.10-0.15 $/second of video)\n- A [Blotato](https://blotato.com/?ref=firas) account with your Instagram Business account connected\n- Self-hosted n8n or n8n Cloud with Verified Community Nodes enabled (Blotato is a community node)\n\n## Customization\n- Change `video_aspect_ratio` (9:16 / 16:9) and `video_duration_seconds` to fit other formats\n- Add extra brand guidance via `extra_creative_direction`\n- Swap the manual trigger for a Schedule Trigger to run this on autopilot\n- Adjust `poll_interval_seconds` / `max_poll_attempts` if your videos take longer to render\n\nNeed help customizing?\nContact me for consulting and support : [Linkedin](https://www.linkedin.com/in/doctor-firass/)\n\n# MY NEW YOUTUBE CHANNEL\n\ud83d\udc49 [Subscribe to my new YouTube channel](https://www.youtube.com/@DrFiras_AI). Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.\n\n[![The AI Doctor](https://www.dr-firas.com/the-ai-doctor.png)](https://www.youtube.com/@DrFiras_AI)"
      },
      "typeVersion": 1
    },
    {
      "id": "f45a6690-acd2-4737-9a6a-04435e670686",
      "name": "Sticky Note 3fe3f7ce",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 236,
        "content": "### Configuration\nSet your product image URL and defaults here."
      },
      "typeVersion": 1
    },
    {
      "id": "c8f96784-c5a1-4aa2-a521-70d8afdd33e5",
      "name": "Sticky Note afa9f8d1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 460,
        "height": 172,
        "content": "### Vision & creative brief\nOpenAI analyzes the image, then writes the video scene prompt."
      },
      "typeVersion": 1
    },
    {
      "id": "5537f210-d156-46ef-b764-cfada038e65c",
      "name": "Sticky Note fe62bde5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        368
      ],
      "parameters": {
        "color": 7,
        "width": 1200,
        "content": "### Video generation (AtlasCloud Seedance 2.0)\nSubmits the prompt, then polls until the video is ready."
      },
      "typeVersion": 1
    },
    {
      "id": "c41fe669-1592-4da3-947f-b0e91b8dc305",
      "name": "Sticky Note 7e740a85",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        432
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 188,
        "content": "### Caption\nOpenAI writes the Instagram caption in parallel with video generation."
      },
      "typeVersion": 1
    },
    {
      "id": "ec0a4335-b04c-47c0-99e0-3eb73bc4665f",
      "name": "Sticky Note 7b72386a",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2032,
        496
      ],
      "parameters": {
        "color": 7,
        "width": 700,
        "height": 140,
        "content": "### Publish\nCombines video + caption, then posts to Instagram via Blotato."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "08bff1c7-8c72-4c2e-99c9-2db37e9041f9",
  "nodeGroups": [],
  "connections": {
    "Video Ready": {
      "main": [
        [
          {
            "node": "Combine Video and Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration": {
      "main": [
        [
          {
            "node": "Analyze Product Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creative Director": {
      "main": [
        [
          {
            "node": "Submit Video Generation Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Write Instagram Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Post Data": {
      "main": [
        [
          {
            "node": "Publish Instagram Reel via Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Status": {
      "main": [
        [
          {
            "node": "Video Ready or Max Attempts?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Polling": {
      "main": [
        [
          {
            "node": "Check Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Product Image": {
      "main": [
        [
          {
            "node": "Creative Director",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Video Status Loop": {
      "main": [
        [],
        [
          {
            "node": "Wait Before Polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Instagram Caption": {
      "main": [
        [
          {
            "node": "Combine Video and Caption",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Combine Video and Caption": {
      "main": [
        [
          {
            "node": "Prepare Post Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Ready or Max Attempts?": {
      "main": [
        [
          {
            "node": "Video Ready",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Poll Video Status Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking Execute workflow": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video Generation Request": {
      "main": [
        [
          {
            "node": "Poll Video Status Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}