{ "name": "Create a product video from one photo with Seedance", "nodes": [ { "parameters": {}, "id": "57971284-d2e1-41b5-b0f7-abfbe10038d7", "name": "Start manually", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ 80, 160 ] }, { "parameters": { "assignments": { "assignments": [ { "id": "59600e42-6753-4595-89ca-9487012d4266", "name": "image_url", "value": "", "type": "string" }, { "id": "65a40b1f-ce9d-4fa4-b9a2-bde54a3be4d6", "name": "prompt", "value": "Create a slow tabletop push-in on the product in the opening photo. Keep its silhouette, materials, colors, and any visible markings consistent. Use soft studio light and a still background.", "type": "string" }, { "id": "38c1d194-3564-4022-96ae-65149eafdab7", "name": "ratio", "value": "9:16", "type": "string" } ] }, "options": {} }, "id": "efb2643c-2524-46bc-80df-c97eaa5174f1", "name": "Set product photo and shot", "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ 300, 160 ] }, { "parameters": { "jsCode": "const { image_url, prompt, ratio } = $input.first().json;\nconst imageUrl = image_url.trim();\nconst shot = prompt.trim();\n\nif (!/^https:\\/\\/[^/\\s?#]+\\/\\S+$/i.test(imageUrl)) {\n throw new Error('Enter the public HTTPS URL of your product photo in Set product photo and shot.');\n}\nif (!shot || !['9:16', '16:9'].includes(ratio)) {\n throw new Error('Enter a shot prompt and choose 9:16 or 16:9.');\n}\n\nreturn [{ json: {\n model: 'doubao-seedance-2-0-fast-260128',\n content: [\n { type: 'text', text: shot },\n { type: 'image_url', role: 'first_frame', image_url: { url: imageUrl } },\n ],\n async: true,\n duration: 5,\n resolution: '720p',\n ratio,\n generate_audio: false,\n} }];" }, "id": "a281c305-5e66-4f14-8bbf-760bc1d153a8", "name": "Prepare generation request", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 520, 160 ] }, { "parameters": { "method": "POST", "url": "https://api.acedata.cloud/seedance/videos", "authentication": "genericCredentialType", "genericAuthType": "httpBearerAuth", "sendBody": true, "contentType": "json", "specifyBody": "json", "jsonBody": "={{ JSON.stringify($json) }}", "options": { "timeout": 30000 } }, "id": "d86d3517-7f51-495e-b38a-36110bb7c9ea", "name": "Submit Seedance video", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ 740, 160 ], "retryOnFail": false }, { "parameters": { "jsCode": "const { task_id, success } = $input.first().json;\nif (success === false || typeof task_id !== 'string' || !task_id.trim()) {\n throw new Error('Seedance returned no task ID. Check the submission execution and account usage before running again.');\n}\nreturn [{ json: { task_id } }];" }, "id": "d775f590-2701-4459-818c-cc4da5d1d39d", "name": "Record task ID", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 960, 160 ] }, { "parameters": { "resume": "timeInterval", "amount": 15, "unit": "seconds" }, "id": "806bec7a-4fa2-4750-a74c-4f46f306426a", "name": "Wait 15 seconds", "type": "n8n-nodes-base.wait", "typeVersion": 1.1, "position": [ 1180, 160 ], "webhookId": "3fbda494-fbe8-4eca-b869-ce455e1f1b8e" }, { "parameters": { "method": "POST", "url": "https://api.acedata.cloud/seedance/tasks", "authentication": "genericCredentialType", "genericAuthType": "httpBearerAuth", "sendBody": true, "contentType": "json", "specifyBody": "json", "jsonBody": "={{ JSON.stringify({ action: 'retrieve', id: $('Record task ID').first().json.task_id }) }}", "options": { "timeout": 30000 } }, "id": "15dd9ae6-18c6-4fb0-8ba3-36c401cde6a0", "name": "Get Seedance task", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ 1400, 160 ], "retryOnFail": false }, { "parameters": { "jsCode": "const record = $input.first().json;\nconst { task_id } = $('Record task ID').first().json;\nif (record.id !== task_id) {\n throw new Error(`Seedance returned no matching record for task ${task_id}. Check the saved task ID and credential access.`);\n}\n\nconst response = record.response;\nconst data = response?.data;\nconst status = data?.status ?? record.status;\nif (response?.success === false || response?.error || ['failed', 'cancelled', 'canceled', 'expired'].includes(status)) {\n throw new Error(`Seedance task ${task_id} failed or was cancelled. Open Get Seedance task to inspect the response.`);\n}\n\nif (record.finished_at != null) {\n const videoUrl = data?.video_url ?? data?.content?.video_url;\n if (response?.success !== true || data?.status !== 'succeeded' || typeof videoUrl !== 'string' || !/^https:\\/\\/[^/\\s]+/i.test(videoUrl)) {\n throw new Error(`Seedance task ${task_id} finished without a successful video URL. Open Get Seedance task to inspect the response.`);\n }\n const { model, ratio } = $('Prepare generation request').first().json;\n return [{ json: { task_id, status: 'succeeded', model, ratio, video_url: videoUrl } }];\n}\n\nif ($runIndex >= 39) {\n throw new Error(`Stopped after 40 lookups. Query Seedance task ${task_id} again later.`);\n}\nreturn [{ json: { task_id, status: 'processing' } }];" }, "id": "8eabb040-13fe-49c6-8d59-1b7a9f1db568", "name": "Check task and video", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 1620, 160 ] }, { "parameters": { "conditions": { "options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict", "version": 2 }, "conditions": [ { "id": "9772c23c-b181-4164-afd1-35aacce26eec", "leftValue": "={{ $json.status }}", "rightValue": "succeeded", "operator": { "type": "string", "operation": "equals" } } ], "combinator": "and" }, "options": {} }, "id": "8ae2610e-b9c0-478b-affb-b038f46a1a93", "name": "Video ready?", "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ 1840, 160 ] }, { "parameters": {}, "id": "a997369d-0fb8-4043-a96b-56efcb74f391", "name": "Review and save video", "type": "n8n-nodes-base.noOp", "typeVersion": 1, "position": [ 2060, 80 ] }, { "parameters": { "content": "## 1. Prepare the shot\nUse a product photo you have permission to share. Paste a direct HTTPS image URL in **Set product photo and shot**. Use **9:16** for vertical video or **16:9** for landscape. Frame the original photo for the selected ratio and keep the prompt focused on one camera movement.\n\nThe sample creates one five-second, silent 720p clip with Seedance 2.0 Fast.", "height": 280, "width": 570, "color": 7 }, "id": "90a4dd53-c25e-4eab-b1c6-385416031edb", "name": "Set up the product shot", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 40, -280 ] }, { "parameters": { "content": "## 2. Connect and run once\nCreate a **Bearer Auth** credential with your raw [Ace Data Cloud API key](https://platform.acedata.cloud/console/applications?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen). Select the same credential in **Submit Seedance video** and **Get Seedance task**. Check [current pricing](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen) and your balance before manually executing. The workflow imports inactive. Each manual run can incur one generation charge.", "height": 280, "width": 485, "color": 7 }, "id": "7ec893a6-55a7-4838-9358-b99d29033409", "name": "Configure the API credential", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 660, -280 ] }, { "parameters": { "content": "## 3. Wait for the result\nThe workflow checks the same task ID up to 40 times with 15 seconds between lookups. If polling stops early, use the ID from **Record task ID** to query the existing task. The workflow can stop while the service is still processing.", "height": 235, "width": 600, "color": 7 }, "id": "be221d31-09cc-476b-bb80-a0c4b3875c5b", "name": "Follow the same task", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 1180, -280 ] }, { "parameters": { "content": "## 4. Review and save\nOpen `video_url` from **Review and save video**. Compare the product shape, markings, and colors with the photo and watch for motion artifacts. If it passes review, use your browser to save the MP4 to your asset folder.", "height": 235, "width": 460, "color": 7 }, "id": "982621f9-0571-4bcc-bef5-4d8ca5f8934a", "name": "Inspect the clip", "type": "n8n-nodes-base.stickyNote", "typeVersion": 1, "position": [ 1840, -280 ] } ], "connections": { "Start manually": { "main": [ [ { "node": "Set product photo and shot", "type": "main", "index": 0 } ] ] }, "Set product photo and shot": { "main": [ [ { "node": "Prepare generation request", "type": "main", "index": 0 } ] ] }, "Prepare generation request": { "main": [ [ { "node": "Submit Seedance video", "type": "main", "index": 0 } ] ] }, "Submit Seedance video": { "main": [ [ { "node": "Record task ID", "type": "main", "index": 0 } ] ] }, "Record task ID": { "main": [ [ { "node": "Wait 15 seconds", "type": "main", "index": 0 } ] ] }, "Wait 15 seconds": { "main": [ [ { "node": "Get Seedance task", "type": "main", "index": 0 } ] ] }, "Get Seedance task": { "main": [ [ { "node": "Check task and video", "type": "main", "index": 0 } ] ] }, "Check task and video": { "main": [ [ { "node": "Video ready?", "type": "main", "index": 0 } ] ] }, "Video ready?": { "main": [ [ { "node": "Review and save video", "type": "main", "index": 0 } ], [ { "node": "Wait 15 seconds", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1" }, "pinData": {}, "tags": [] }