This workflow corresponds to n8n.io template #12752 — we link there as the canonical source.
This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a320c8e9-43fd-456d-b65f-cf22cc2a70aa",
"name": "Get Image Array",
"type": "n8n-nodes-base.code",
"position": [
576,
-320
],
"parameters": {
"jsCode": "const items = $(\"Get Ready Task\").all();\nreturn items.map(item => {\n const data = item.json;\n\n return {\n json: {\n images: [\n data[\"Product Photo\"],\n data[\"Character\"],\n data[\"Background\"]\n ]\n }\n };\n});"
},
"typeVersion": 2
},
{
"id": "5e0f8083-8bbb-45a5-b297-8cf8f64d1867",
"name": "NanoBanana Pro Edit",
"type": "n8n-nodes-base.httpRequest",
"position": [
1696,
-320
],
"parameters": {
"url": "https://api.atlascloud.ai/api/v1/model/generateImage",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"google/nano-banana-pro/edit\",\n \"aspect_ratio\": \"9:16\",\n \"enable_base64_output\": false,\n \"enable_sync_mode\": true,\n \"images\": {{ $json.images.toJsonString() }},\n \"output_format\": \"png\",\n \"prompt\": \"{{ $json.prompt.replace(/\\r?\\n|\\r/g, ' ').replace(/\"/g, '').replace(/[\u201c\u201d]/g, '') }} }}\",\n \"resolution\": \"2k\"\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.3
},
{
"id": "c2ab730e-597f-472c-ad36-9c666b98b846",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
800,
-320
],
"parameters": {
"options": {},
"fieldToSplitOut": "images"
},
"typeVersion": 1
},
{
"id": "f0872203-10ef-44c2-ae5e-ce6a542c0d76",
"name": "Download Images",
"type": "n8n-nodes-base.httpRequest",
"position": [
1024,
-320
],
"parameters": {
"url": "={{ $json.images }}",
"options": {}
},
"typeVersion": 4.3
},
{
"id": "6b98ddcd-ec79-4456-9335-700b9cc54250",
"name": "Get Temp Url",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
1248,
-320
],
"parameters": {
"url": "https://tmpfiles.org/api/v1/upload",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "file",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
}
]
}
},
"retryOnFail": false,
"typeVersion": 4.3
},
{
"id": "eba3711a-fd45-4fbd-844b-3ef03726a9c7",
"name": "Image Prompt Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
240,
-320
],
"parameters": {
"text": "=Product: {{ $json['Product Name'] }}\nScene: {{ $json[\"Video Scene\"] }}",
"options": {
"systemMessage": "=You are an expert in hyper-realistic user-generated content (UGC) photography prompts for image generation models.\n\nYou will be provided with:\n- Product photo (MUST remain unchanged)\n- Character reference photo (MUST match exactly)\n- Background reference photo (MUST match exactly)\n- Scene description\n\nYour task is to generate a CONCISE prompt (maximum 100 words) that directs the model to create a clean, simple selfie image.\n\nCRITICAL RULES:\n1) OUTPUT MUST BE IN ENGLISH ONLY\n2) Keep prompt SHORT and SIMPLE - avoid excessive detail\n3) NEVER describe hands in detail - just say \"holding product naturally\"\n4) Focus on: character match, product accuracy, background match, selfie angle\n5) Avoid describing: multiple hand positions, complex gestures, finger details\n\nPROMPT STRUCTURE (follow this order):\n- Selfie-style photo of [character description matching reference]\n- Holding [product name from reference] in one hand naturally\n- In [background setting from reference]\n- Natural smile, eye contact with camera\n- Soft natural lighting, shallow depth of field\n- Authentic UGC feel, not studio photo\n\nFORMAT OUTPUT:\n- Output ONLY the prompt in English\n- Maximum 100 words\n- No explanations, no bullet points, no extra text\n- Just the prompt, nothing else\n\nCRITICAL: Keep it simple. Complex prompts cause distorted hands and multiple limbs."
},
"promptType": "define",
"needsFallback": true
},
"typeVersion": 3.1
},
{
"id": "6d2fdfd6-aa56-48d5-91a2-6ccb513b627f",
"name": "Get Clean Data",
"type": "n8n-nodes-base.code",
"position": [
1472,
-320
],
"parameters": {
"jsCode": "const uploadItems = $input.all();\nconst originalData = $(\"Get Ready Task\").first().json;\nconst aiAgent = $(\"Image Prompt Agent\").first().json;\n\n// Ambil semua URL dan fix formatnya\nconst urls = uploadItems\n .filter(item => item.json?.data?.url)\n .map(item => {\n let url = item.json.data.url;\n url = url.replace('tmpfiles.org/', 'tmpfiles.org/dl/');\n url = url.replace('http://', 'https://');\n return url;\n });\n\n// Validasi: pastikan ada 3 URL\nif (urls.length !== 3) {\n throw new Error(`Expected 3 images, got ${urls.length}`);\n}\n\n// Ambil prompt dari AI Agent\nlet prompt = aiAgent.output || aiAgent.text || aiAgent.content || '';\n\n// Fallback jika prompt kosong\nif (!prompt || prompt.trim() === '') {\n prompt = `Selfie photo of Indonesian woman holding ${originalData[\"Product Name\"]} naturally in bright room by window. Natural smile, looking at camera. Soft morning light. Casual style. Authentic UGC feel.`;\n}\n\n// Limit prompt ke 80 kata\nconst words = prompt.trim().split(/\\s+/);\nif (words.length > 80) {\n prompt = words.slice(0, 80).join(' ');\n}\n\n// Return request body\nreturn [{\n json: {\n images: urls,\n prompt: prompt,\n metadata: {\n taskId: originalData[\"Task ID\"],\n productId: originalData[\"Product ID\"],\n rowNumber: originalData[\"row_number\"],\n productName: originalData[\"Product Name\"]\n }\n }\n}];"
},
"typeVersion": 2
},
{
"id": "3df42e13-e8f1-4be4-817a-c24054a74471",
"name": "If Image Success",
"type": "n8n-nodes-base.if",
"position": [
1920,
-320
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "f15fd9ac-d057-4ddd-ac04-4783642a8c23",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.code }}",
"rightValue": "=200"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.3
},
{
"id": "233aff3e-e0a2-46b7-a47b-196d44f409d3",
"name": "Update Edit Task [SUCCESS]",
"type": "n8n-nodes-base.googleSheets",
"position": [
2368,
-416
],
"parameters": {
"columns": {
"value": {
"Status": "Edited",
"Task ID": "={{ $('Get Clean Data').item.json.metadata.taskId }}",
"Image Prompt": "={{ $('Get Clean Data').item.json.prompt }}",
"Image Result": "={{ $('If Image Success').item.json.data.outputs.first() }}",
"Analyze Image": "={{ $json[0].content[0].text }}"
},
"schema": [
{
"id": "Task ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Task ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product ID",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Photo",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Photo",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Background",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Background",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Target Market",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Target Market",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Prompt",
"type": "string",
"display": true,
"required": false,
"displayName": "Image Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Result",
"type": "string",
"display": true,
"required": false,
"displayName": "Image Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analyze Image",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Analyze Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Task ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?gid=268342285#gid=268342285"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "c300751b-a8ef-4a3d-921d-924a9864088a",
"name": "Update Edit Task [ERROR]",
"type": "n8n-nodes-base.googleSheets",
"position": [
2144,
-224
],
"parameters": {
"columns": {
"value": {
"Status": "Error",
"Task ID": "={{ $('Get Clean Data').item.json.metadata.taskId }}"
},
"schema": [
{
"id": "Task ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Task ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product ID",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Photo",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Photo",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Background",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Background",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Task ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?gid=268342285#gid=268342285"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "e39f2d71-1fe6-4a3d-923f-d747765310f2",
"name": "Video Prompt Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
224,
96
],
"parameters": {
"text": "=Product Name: {{ $json[\"Product Name\"] }}\nVideo Scene: {{ $json[\"Video Scene\"] }}\nTarget Market: {{ $json[\"Target Market\"] }}\nProduct Description: {{ $json[\"Product Description\"] }}\nImage Reference: {{ $json[\"Analyze Image\"] }}",
"options": {
"systemMessage": "=## System Message\n\nYou are an expert UGC (User-Generated Content) video prompt creator for AI video generation models (e.g., Veo 3.1).\n\nYour task is to generate **ONE** realistic, selfie-style video prompt based on:\n- Product information \n- Video scene description \n- Target market \n- Product description \n- Reference image analysis (style consistency only)\n\nThe output must describe a video that feels authentic, casual, and user-generated, as if recorded naturally by an everyday content creator. The video should focus on **product usage and experience**, not personal traits.\n\n---\n\n## CRITICAL RULES\n- **Output must be in ENGLISH ONLY**\n- Spoken dialogue must follow the Dialog Language Rules below\n- The subject must always be a **clearly defined adult (20+ years old)**\n- Avoid sensitive, sexualized, or unnecessary physical descriptions\n- Keep descriptions professional, neutral, and product-focused\n\n---\n\n## Dialog Language Rule\n- **Default:** Spoken dialogue must be in Indonesian (Bahasa Indonesia) \n- **Exception:** If the Target Market explicitly specifies another language or nationality, use that language \n- Always write the **exact spoken dialogue in quotation marks** inside the English prompt\n\n---\n\n## Core Video Requirements\n\n### Subject & Framing\n- Subject is an adult creator aligned with the Target Market\n- Video is recorded selfie-style at arm\u2019s length\n- Subject looks directly into the lens while speaking\n- Vertical 9:16 format (TikTok / Instagram Reels style)\n- One hand interacts with the product; the recording device is never visible\n\n### Visual Style\n- Natural lighting and a realistic everyday setting (e.g., bedroom, vanity, office, car)\n- Slight camera shake, subtle grain, and minor imperfections for authenticity\n- Product must be clearly visible and used naturally\n- **Do NOT show** the phone, camera, reflections, mirrors, or filming equipment\n- **No** on-screen text, subtitles, watermarks, logos, or graphic overlays\n- Match overall vibe, wardrobe simplicity, and tone with the reference image without mentioning it\n\n### Tone & Dialogue\n- 1\u20132 short, casual spoken sentences\n- Conversational, personal, and experience-based\n- Avoid exaggerated claims, medical claims, or advertising-style language\n- Focus on texture, feel, ease of use, or everyday practicality\n\n### Technical Specs\n- Duration: 8 seconds\n- Shot type: handheld selfie-style\n- Lighting: natural and realistic\n- Reference image is for visual consistency only and must not be referenced\n\n---\n\n## Google AI Safety & Compliance Guidelines\nTo ensure approval:\n- Use neutral descriptors such as \u201cadult creator,\u201d \u201cyoung adult,\u201d or \u201ceveryday content creator\u201d\n- Avoid age ranges that include minors\n- Avoid unnecessary physical or personal detail\n- Focus on actions, setting, and product interaction\n- Keep all descriptions appropriate, professional, and non-sensitive\n\n---\n\n## Output Format\n- Output **ONE** cohesive video prompt as a single block of text\n- Dialogue must appear in quotation marks in the correct language\n- Do not include explanations, lists, links, or multiple versions\n- Do not mention policies, filters, or reference images"
},
"promptType": "define",
"needsFallback": true
},
"typeVersion": 3.1
},
{
"id": "d8ec55e8-cb8c-4f28-bf27-4aa4413f7ad0",
"name": "Get Ready Task",
"type": "n8n-nodes-base.googleSheets",
"position": [
0,
-320
],
"parameters": {
"options": {
"returnFirstMatch": false
},
"filtersUI": {
"values": [
{
"lookupValue": "Ready",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?usp=sharing"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "ab9a35ab-89b1-4dc4-8a6e-d992246d0352",
"name": "Schedule Trigger Make Videos",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-224,
96
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.3
},
{
"id": "131f3ea5-a3b1-41f4-9dc2-8c042fb18db1",
"name": "Schedule Trigger Edit Images",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-224,
-320
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"typeVersion": 1.3
},
{
"id": "aa316402-e44d-415a-9d33-1b0742e604d5",
"name": "Get Edited Task",
"type": "n8n-nodes-base.googleSheets",
"position": [
0,
96
],
"parameters": {
"options": {
"returnFirstMatch": false
},
"filtersUI": {
"values": [
{
"lookupValue": "Edited",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?gid=268342285#gid=268342285"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "9fb659f6-ecd3-4dea-8491-dd8f148b038b",
"name": "Analyze image",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2144,
-416
],
"parameters": {
"text": "=Describe the image in one concise paragraph: explain what the main human subject is doing and their facial expression, describe the environment (indoor or outdoor, key background elements, lighting), and describe exactly what the person is holding (object type, color, shape, any visible brand or readable text quoted exactly as seen), plus a brief note on composition (selfie vs not, close-up vs wide, sharp vs blurry).",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"imageUrls": "={{ $json.data.outputs[0] }}",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 2.1
},
{
"id": "ede259a2-76d7-4ae7-8751-a5e3ce46204f",
"name": "Veo 3.1",
"type": "n8n-nodes-base.httpRequest",
"position": [
576,
96
],
"parameters": {
"url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"google/veo3.1/image-to-video\",\n \"aspect_ratio\": \"9:16\",\n \"duration\": 8,\n \"generate_audio\": true,\n \"image\": \"{{ $('Get Edited Task').item.json['Image Result'] }}\",\n \"prompt\": \"{{ $json.output.replace(/\\r?\\n|\\r/g, ' ').replace(/\"/g, '').replace(/[\u201c\u201d]/g, '') }} }}\",\n \"resolution\": \"1080p\",\n \"seed\": 1\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.3
},
{
"id": "162d3166-eba1-486c-b00c-ee6e31a3f4a3",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
800,
96
],
"parameters": {
"amount": 10
},
"typeVersion": 1.1
},
{
"id": "fe12cf19-4e54-459b-b1a9-19cafb32b769",
"name": "Get a Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
1024,
96
],
"parameters": {
"url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $json.data.id }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"name": "<your credential>"
}
},
"retryOnFail": true,
"typeVersion": 4.3
},
{
"id": "688c69af-7dcf-42d7-a3cc-e1af1b9b0b3e",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1248,
80
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "completed",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4a2c247a-e120-4fac-b4dd-c0b0ea84d7bd",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "completed"
}
]
},
"renameOutput": true
},
{
"outputKey": "failed",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2bdd72c6-208a-4896-a34c-5b915962ea80",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "failed"
}
]
},
"renameOutput": true
},
{
"outputKey": "processing",
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "740abc84-c084-45b8-aa20-f09458245f86",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "processing"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "ec416ba7-380d-4aeb-9f87-39487cf8b94f",
"name": "Update Video Task [ERROR]",
"type": "n8n-nodes-base.googleSheets",
"position": [
1472,
192
],
"parameters": {
"columns": {
"value": {
"Status": "Error",
"Task ID": "={{ $('Get Edited Task').item.json[\"Task ID\"] }}",
"Video Prompt": "={{ $('Video Prompt Agent').item.json.output }}",
"Error Message": "={{ $json.data.error }}"
},
"schema": [
{
"id": "Task ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Task ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product ID",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Photo",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Photo",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Background",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Background",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Target Market",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Target Market",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analyze Image",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Analyze Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Video Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Message",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Error Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Task ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?gid=268342285#gid=268342285"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "2ef8a48e-089b-4fcb-8071-36d3bfec8631",
"name": "Update Video Task [SUCCESS]",
"type": "n8n-nodes-base.googleSheets",
"position": [
1472,
0
],
"parameters": {
"columns": {
"value": {
"Status": "Finished",
"Task ID": "={{ $('Get Edited Task').item.json[\"Task ID\"] }}",
"Video Prompt": "={{ $('Video Prompt Agent').item.json.output }}",
"Video Result": "={{ $('Get a Video').item.json.data.outputs.first() }}"
},
"schema": [
{
"id": "Task ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Task ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product ID",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Photo",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Photo",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Character",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Character",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Background",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Background",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Product Description",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Product Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Target Market",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Target Market",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Scene",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Video Scene",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image Result",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Image Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Analyze Image",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Analyze Image",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Prompt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Video Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Video Result",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Video Result",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Error Message",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Error Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Task ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 268342285,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit#gid=268342285",
"cachedResultName": "Task"
},
"documentId": {
"__rl": true,
"mode": "url",
"value": "=https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/edit?gid=268342285#gid=268342285"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "1143459a-921d-49bd-a3b5-04ca4f571157",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-448
],
"parameters": {
"color": 6,
"width": 2912,
"height": 416,
"content": "## Combine 3 Images into 1 (Product, Character, Background)"
},
"typeVersion": 1
},
{
"id": "9f44c4dd-ed43-4a6d-bd74-f4339a52f897",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-32
],
"parameters": {
"color": 3,
"width": 2016,
"height": 416,
"content": "## Make Video from Images"
},
"typeVersion": 1
},
{
"id": "bd4b00b7-cbfd-4470-81e6-bc220d128e3a",
"name": "GPT-5-Mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
192,
-96
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "openai/gpt-5-mini",
"cachedResultName": "openai/gpt-5-mini"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "d67ef15d-3e2d-401f-a3cd-403acd774390",
"name": "GPT-OSS-120b",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
336,
-96
],
"parameters": {
"model": "openai/gpt-oss-120b",
"options": {}
},
"credentials": {
"groqApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "bdd51f42-db1b-490e-9e25-7734311d6852",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
-528
],
"parameters": {
"color": 7,
"width": 512,
"height": 672,
"content": "## \ud83d\udd25 Follow My Channels\n\nDon't miss out on **AI and Automation** content! Follow me on:\n\n\ud83c\udfa5 **YouTube:** [@aichandre](https://www.youtube.com/@aichandre) \n\ud83d\udcf8 **Instagram:** [@aichandre](https://www.instagram.com/aichandre) \n\ud83c\udfb5 **TikTok:** [@aichandre](https://www.tiktok.com/@aichandre)\n\n***\n\n## \ud83d\udcfa Full Tutorial\n\n[](https://youtu.be/wOdtH54A8iE)\n\n***"
},
"typeVersion": 1
},
{
"id": "cb4397ac-c7ee-4a62-9ffa-9df369bc4f2b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
-528
],
"parameters": {
"color": 7,
"width": 512,
"height": 912,
"content": "## \ud83d\udee0\ufe0f Quick Setup Guide\n\n**Created by:** [Kristian Ekachandra](https://yapp.ink/aichandre)\n\n### \u2705 Step 1: Add Google Sheets Credentials\nSet up OAuth2 credentials from [Google Cloud Console](https://console.cloud.google.com/) in n8n.\n\n### \u2705 Step 2: Duplicate Template & Update Links\n1. [Duplicate this Google Sheets template](https://docs.google.com/spreadsheets/d/1wVz-tvvAuYi9sHtHj40i4yeOFZMbdwmuaQR5N5wRg08/copy)\n2. Update ALL Google Sheets node URLs to your cloned spreadsheet\n\n### \u2705 Step 3: Connect AI Model API Keys\nAdd at least ONE API key:\n- [OpenAI](https://platform.openai.com) \u2192 GPT-5-Mini node\n- [Groq](https://groq.com) \u2192 GPT-OSS-120b node (fallback)\n- [Gemini](https://aistudio.google.com/app/apikey) (alternative)\n\n### \u2705 Step 4: Add Atlas Cloud API Key\nInsert [Atlas Cloud](https://goto.atlascloud.ai/Kristian?ref=TM2L4K) API key in:\n- NanoBanana Pro Edit node\n- Veo 3.1 node\n\n### \ud83d\udca1 Step 5: Test It!\n1. Add a task in your Google Sheets (Status: \"Ready\")\n2. Run \"Schedule Trigger Edit Images\" manually\n3. Wait for Status \u2192 \"Edited\"\n4. Run \"Schedule Trigger Make Videos\" manually\n5. Check results in Image Result & Video Result columns\n\n***\n\n## \ud83d\ude80 What This Does\n\n**Combines 3 images** (product + character + background) into realistic UGC selfie photos, then **generates 8-second videos** using AI.\n\n**Perfect for:** TikTok ads, Instagram Reels, product demos, social media content.\n\n***"
},
"typeVersion": 1
}
],
"connections": {
"Wait": {
"main": [
[
{
"node": "Get a Video",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Update Video Task [SUCCESS]",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Video Task [ERROR]",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Veo 3.1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Download Images",
"type": "main",
"index": 0
}
]
]
},
"GPT-5-Mini": {
"ai_languageModel": [
[
{
"node": "Image Prompt Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Video Prompt Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get a Video": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"GPT-OSS-120b": {
"ai_languageModel": [
[
{
"node": "Image Prompt Agent",
"type": "ai_languageModel",
"index": 1
},
{
"node": "Video Prompt Agent",
"type": "ai_languageModel",
"index": 1
}
]
]
},
"Get Temp Url": {
"main": [
[
{
"node": "Get Clean Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Image Array",
"type": "main",
"index": 0
}
]
]
},
"Analyze image": {
"main": [
[
{
"node": "Update Edit Task [SUCCESS]",
"type": "main",
"index": 0
}
]
]
},
"Get Clean Data": {
"main": [
[
{
"node": "NanoBanana Pro Edit",
"type": "main",
"index": 0
}
]
]
},
"Get Ready Task": {
"main": [
[
{
"node": "Image Prompt Agent",
"type": "main",
"index": 0
}
]
]
},
"Download Images": {
"main": [
[
{
"node": "Get Temp Url",
"type": "main",
"index": 0
}
]
]
},
"Get Edited Task": {
"main": [
[
{
"node": "Video Prompt Agent",
"type": "main",
"index": 0
}
]
]
},
"Get Image Array": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"If Image Success": {
"main": [
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
],
[
{
"node": "Update Edit Task [ERROR]",
"type": "main",
"index": 0
}
]
]
},
"Image Prompt Agent": {
"main": [
[
{
"node": "Get Image Array",
"type": "main",
"index": 0
}
]
]
},
"Video Prompt Agent": {
"main": [
[
{
"node": "Veo 3.1",
"type": "main",
"index": 0
}
]
]
},
"NanoBanana Pro Edit": {
"main": [
[
{
"node": "If Image Success",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger Edit Images": {
"main": [
[
{
"node": "Get Ready Task",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger Make Videos": {
"main": [
[
{
"node": "Get Edited Task",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleSheetsOAuth2ApigroqApihttpBearerAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automatically create consistent, professional UGC (User-Generated Content) videos at scale using cutting-edge AI models. This workflow combines three reference images into hyper-realistic selfie-style photos, then transforms them into engaging 8-second videos perfect for TikTok,…
Source: https://n8n.io/workflows/12752/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is designed for: Content creators and marketers E-commerce and product-based businesses Agencies producing social media visuals and videos Automation builders looking for AI-powered crea
This workflow is for beauty salons who want consistent, high‑quality social media content without writing every post manually. It also suits agencies and automation builders who manage multiple beauty
This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video p
Content marketers and SEO specialists who need to generate multiple SEO-optimized articles targeting keyword variations. Ideal for affiliate sites, niche blogs, or service-based businesses creating lo
Most blogs publish words. This system publishes experiences.