This workflow corresponds to n8n.io template #13920 — we link there as the canonical source.
This workflow follows the Chainllm → Google Drive 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 →
{
"id": "r5piNpzWcg3Gto0M",
"name": "Use AI to generate advertising Video (EN)",
"tags": [],
"nodes": [
{
"id": "dc559123-db84-446f-aae5-288ea9a3c860",
"name": "Section \u2013 Input image",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
496
],
"parameters": {
"color": 7,
"width": 1496,
"height": 280,
"content": "## Input image\nDownload the input image from Drive and convert it to base64."
},
"typeVersion": 1
},
{
"id": "c8d459cb-a7c6-490c-b05c-c25549cf5821",
"name": "When clicking 'Test workflow'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
928,
624
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d217ae22-cbe8-4404-a5ce-b1a8f4a9afdd",
"name": "Sample Promt",
"type": "n8n-nodes-base.set",
"disabled": true,
"position": [
1312,
1344
],
"parameters": {
"options": {}
},
"typeVersion": 3.4
},
{
"id": "8851f0d7-1b4f-47a4-9462-08bdef172b35",
"name": "Main overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-16,
-112
],
"parameters": {
"width": 784,
"height": 720,
"content": "## AI Product Advertising Video\n\n### How it works\nThis workflow generates an 8-second product advertising video from a single input image. It downloads the image from Google Drive, converts it to base64 for the API request, analyzes it with Gemini (Creative Visualiser), then turns the description into a short video script/prompt. The prompt + image are sent to Veo to start a long-running video generation job. The workflow polls until a video URI is available, downloads the MP4, and uploads it back to Google Drive.\n\n### Setup\n1) Connect credentials used in this workflow: Google Drive + Google Gemini, and an API key for the Veo HTTP requests.\n2) Set the input image file in **Download ad image**.\n3) Set the output folder in **Upload to Drive**.\n4) (Optional) Adjust `aspectRatio`, `resolution`, and `durationSeconds` in **Generate Video**, then execute the workflow."
},
"typeVersion": 1
},
{
"id": "55e14a38-fde6-4896-b6cb-98d05ebf2fc4",
"name": "Creative Visualiser",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
1760,
896
],
"parameters": {
"text": "You are a professional Creative Visualiser with pixel-level image analysis skills. Your task is to decode product images into a \"Visual Technical Brief\" to serve as input for the Creative Director.\n\n**Instructions:**\n1. **Product Focus:** Accurately identify the main subject. Describe the texture, reflectivity, and details on the packaging/surface.\n2. **Environment Analysis:** Analyze the surrounding context. Is it a studio (plain background) or a lifestyle (outdoor/room)?\n3. **Lighting & Color:** Identify the main light source (Key light) and fill light. List the main color palette (Color Palette).\n4. **Camera Logic:** Infer from what angle (Eye-level, Low-angle, Top-down) and focal length (Wide-angle or Telephoto) this image was taken.\n\n**Output Format (Strictly Follow):**\n* **ENTITY:** [Product Name & Brand].\n\n* **VISUAL ATTRIBUTES:** [Detailed description of shape, color, material, and labels].\n\n* **LIGHTING SETUP:** [Description of light direction, intensity, and shadows].\n\n* **BACKGROUND & VIBE:** [Description of background, depth of field (DoF), sense of space].\n\n* **TECHNICAL SPEC:** [Camera angle, assumed focal length, dominant color palette].",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "image",
"inputType": "binary",
"operation": "analyze",
"binaryPropertyName": "ad_img"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "815ba6fa-9366-4ba8-b0d6-18a92fd66624",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2000,
1008
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "5e89ad0b-a835-4111-9416-8c85988df66b",
"name": "Get URL Download",
"type": "n8n-nodes-base.httpRequest",
"position": [
1264,
1200
],
"parameters": {
"url": "=https://generativelanguage.googleapis.com/v1beta/{{ $json.name }}",
"options": {},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.4
},
{
"id": "cc8c78e2-2105-4fcc-a637-ca1df46102b7",
"name": "Get Dowload Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
2032,
1200
],
"parameters": {
"url": "={{ $json.response.generateVideoResponse.generatedSamples[0].video.uri }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.4
},
{
"id": "1011d3d1-2dad-4f93-8825-fed25f7085be",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
1488,
1200
],
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "5ab8dd47-7a71-4ee7-b909-f8b5be8fdd3f",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
1744,
1200
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f93be0d0-7dac-4ee9-a3c6-dc7026ff343f",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.response.generateVideoResponse.generatedSamples[0].video.uri }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.3
},
{
"id": "daa26102-8a77-4368-aab6-7194b7f15685",
"name": "Extract Model Image",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1872,
624
],
"parameters": {
"options": {},
"operation": "binaryToPropery",
"destinationKey": "ad_img_base64",
"binaryPropertyName": "ad_img"
},
"typeVersion": 1.1
},
{
"id": "e38e9245-aee8-490e-97b9-c8a9fb45eab0",
"name": "Download ad image",
"type": "n8n-nodes-base.googleDrive",
"position": [
1408,
624
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "list",
"value": "17yJ61cff7hNTHn5HYDM86I6y3fSTBarv",
"cachedResultUrl": "https://drive.google.com/file/d/17yJ61cff7hNTHn5HYDM86I6y3fSTBarv/view?usp=drivesdk",
"cachedResultName": "124_ad_img.png"
},
"options": {
"binaryPropertyName": "ad_img"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "c9f08db3-900d-4a0c-8979-c8d13c41f22b",
"name": "Section \u2013 Create video prompt",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
848
],
"parameters": {
"color": 7,
"width": 1432,
"height": 280,
"content": "## Create video prompt\nGemini turns the image brief into an 8s Vietnamese script."
},
"typeVersion": 1
},
{
"id": "faa75552-a362-4a31-8808-a2dcb96859ea",
"name": "Product Video Prompt",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
2112,
896
],
"parameters": {
"text": "=Image description: {{ $json.content.parts[0].values() }}",
"messages": {
"messageValues": [
{
"message": "=You are the Creative Director and Copywriter at a leading advertising agency in Vietnam. Your task is to transform image descriptions into professional 8-second video scripts.\n\n\n 1. **Language:** Use natural English.\n\n 2. **Pace:** An 8-second video should have a maximum of 20-25 words. Pause frequently to prevent breathlessness for the voiceover.\n\n 3. **Choose Tone of Voice:** Based on the product in the image, automatically select one of four styles: [Elegant, Dynamic, Authentic, Professional].\n\n\n **Output Structure (Required):**\n\n * **VOICE STYLE (ToV):** [Style Name] - [Description of Voice Emotion].\n\n * **IMAGES (Visual):** [Description of camera movement, user action pattern in 8 seconds].\n\n * **DIALOGUE (Script):** - (0-3s): [Impressive Hook]\n\n * (4-8s): [Main Message + Slogan/Brand Name]\n\n\n * **AUDIO/SFX):** [Description of background music and sound effects].\n\n\n\n---\n### 3. Demo Example\n\n**Input:** *\"Close-up image of a Vietnamese iced milk coffee, snow-white ice cubes, blended condensed milk, a sunny morning scene in a cafe.\"*\n\n**AI Output:**\n\n* **VOICE STYLE (ToV):** Authentic - Warm, friendly voice, leisurely pace.\n\n* **IMAGE (Visual):** (0-3 seconds) Close-up (Macro) of the white condensed milk falling onto the dark brown coffee, creating a cloud-like effect. (4-6 seconds) Fast-forward (Whip-pan) camera to a person blinking once, answering relaxedly in the bright sunlight. (7-8 seconds) Frame the coffee cup on the wooden table.\n\n* **DIALOGUE (Script):**\n\n* (0-3s): \"Packaging the richness of morning sunshine in every suffering...\"\n\n* (4-8s): \"Street Coffee - Rich and authentic.\"\n\n* **SOUND (Audio/SFX):** Gentle acoustic guitar music. SFX: The clinking sound of ice against the glass, the distant chirping of birds.\n\n---\n\n###Expert Review (The \"Pro\" Touch):\n\nTo make this reminder truly impactful, please note:\n\n1. **Syllables:** Vietnamese is a monosyllabic language. 20 Vietnamese words will sound longer than 20 English words. I recommend you tell the AI: **\"Prioritize sentences of 6-8 words for each 4-second segment\"** to ensure rhythm (like l\u1ee5c b\u00e1t poetry or folk rhymes, very catchy for Vietnamese listeners).\n\n**Would you like me to add a \"Target Audience\" section so that the AI \u200b\u200bcan adjust the wording (such as \"Mr/Ms,\" \"You,\" \"Me,\" \"I\") for accuracy?**"
}
]
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "7b52de5a-ee5a-4aa5-a428-d03572b90d33",
"name": "Section \u2013 Generate video",
"type": "n8n-nodes-base.stickyNote",
"position": [
992,
1152
],
"parameters": {
"color": 7,
"width": 936,
"height": 376,
"content": "## Generate video\nStart the Veo job using the image + prompt."
},
"typeVersion": 1
},
{
"id": "b57c1b00-89ce-42a8-847c-3acaeccdc310",
"name": "Section \u2013 Download & upload",
"type": "n8n-nodes-base.stickyNote",
"position": [
1968,
1152
],
"parameters": {
"color": 7,
"width": 936,
"height": 376,
"content": "## Download & upload\nPoll until ready, download MP4, upload to Drive."
},
"typeVersion": 1
},
{
"id": "dbc447d3-b75a-4a95-adfd-eb64245d4120",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
2432,
640
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.1
},
{
"id": "f5eabfae-c5a1-40a3-b89c-a8144522d9da",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2320,
1008
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"title\": \"Generated schema for Root\",\n \"type\": \"object\",\n \"properties\": {\n \"video_prompt\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"video_prompt\"\n ]\n}"
},
"typeVersion": 1.3
},
{
"id": "6b7ccebf-7bed-41d1-af6e-74ac8e1fa072",
"name": "Generate Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
992,
1200
],
"parameters": {
"url": "https://generativelanguage.googleapis.com/v1beta/models/veo-3.1-fast-generate-preview:predictLongRunning",
"method": "POST",
"options": {},
"jsonBody": "={\n \"instances\": [\n {\n \"image\": {\n \"bytesBase64Encoded\": \"{{ $json.ad_img_base64 }}\",\n \"mimeType\": \"image/png\"\n },\n \"prompt\": {{ JSON.stringify($json.output.video_prompt) }}\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"resolution\": \"720p\",\n \"durationSeconds\": 8,\n \"sampleCount\": 1\n }\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": "7019d86a-5ddb-46cb-a254-82d05ecb5b16",
"name": "Upload to Drive",
"type": "n8n-nodes-base.googleDrive",
"onError": "continueRegularOutput",
"position": [
2384,
1200
],
"parameters": {
"name": "={{ 'ad_video_' + $now.toMillis() + '.mp4' }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "12lAlOc_1c2a35L45F7Zv5ImpvWgfdf19",
"cachedResultUrl": "https://drive.google.com/drive/folders/12lAlOc_1c2a35L45F7Zv5ImpvWgfdf19",
"cachedResultName": "AI advertising"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "80c7f1b3-e2ca-40b9-a48c-a3f84ff0f72e",
"connections": {
"If": {
"main": [
[
{
"node": "Get Dowload Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Get URL Download",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "Generate Video",
"type": "main",
"index": 0
}
]
]
},
"Generate Video": {
"main": [
[
{
"node": "Get URL Download",
"type": "main",
"index": 0
}
]
]
},
"Get URL Download": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Download ad image": {
"main": [
[
{
"node": "Extract Model Image",
"type": "main",
"index": 0
},
{
"node": "Creative Visualiser",
"type": "main",
"index": 0
}
]
]
},
"Get Dowload Video": {
"main": [
[
{
"node": "Upload to Drive",
"type": "main",
"index": 0
}
]
]
},
"Creative Visualiser": {
"main": [
[
{
"node": "Product Video Prompt",
"type": "main",
"index": 0
}
]
]
},
"Extract Model Image": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Product Video Prompt": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Product Video Prompt",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Product Video Prompt",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When clicking 'Test workflow'": {
"main": [
[
{
"node": "Download ad image",
"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.
googleDriveOAuth2ApigooglePalmApihttpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow generates an 8-second product advertising video from a single input image. It downloads the image from Google Drive, converts it to base64 for the API request, analyzes it with Gemini (Creative Visualiser), then turns the description into a short video…
Source: https://n8n.io/workflows/13920/ — 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.
Input business details – Takes business name, description, services, offer, CTA, location, and target audience from a form Write the script – Uses Gemini 2.5 Pro to create a 16-second, two-part micro-
Use cases are many: This tool is perfect for YouTube and Shorts creators who want to publish daily content without showing their face, TikTok and Reels marketers automating voice-over-driven videos, a
Awesome N8N Templates. Uses notion, lmChatOpenAi, outputParserStructured, chainLlm. Event-driven trigger; 36 nodes.
This n8n template demonstrates how to create an automated emotional story generation system that produces structured video prompts and generates corresponding images using AI. The workflow creates a c
(from just and image to complete Shopify product page.)