
text-to-video generation using Google Veo3 API and Google Drive
描述
分类
🤖 AI & Machine Learning
使用的节点
n8n-nodes-base.ifn8n-nodes-base.waitn8n-nodes-base.waitn8n-nodes-base.switchn8n-nodes-base.emailSendn8n-nodes-base.emailSendn8n-nodes-base.emailSendn8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
价格免费
浏览量0
最后更新11/28/2025
workflow.json
{
"meta": {
"instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "d990b552-ac91-4e26-81d8-55b99196a5af",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-624,
640
],
"webhookId": "99c989d4-d7e6-42d9-9f05-5235e2624149",
"parameters": {
"options": {},
"formTitle": "Txt to video With Google Veo3 ",
"formFields": {
"values": [
{
"fieldLabel": "Prompt",
"placeholder": "Prompt Put Here",
"requiredField": true
}
]
},
"formDescription": "Txt to video With Google Veo3 "
},
"typeVersion": 2.2
},
{
"id": "d9232460-4049-4481-b1af-84cf39f88c79",
"name": "Wait for API Response",
"type": "n8n-nodes-base.wait",
"position": [
48,
112
],
"webhookId": "71ca11ef-f404-4ba5-b88e-c230c717744a",
"parameters": {
"amount": 35
},
"typeVersion": 1.1
},
{
"id": "ea4d7d1d-76f7-4a4d-baeb-5d36a18820c4",
"name": "API Request: Check Task Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
384,
176
],
"parameters": {
"url": "=https://google-veo-3.p.rapidapi.com/predictions/{{ $json.id }}",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "google-veo-3.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "a055e5dd-839d-41f2-8363-b03ee885fa80",
"name": "Condition: Task Output Status",
"type": "n8n-nodes-base.switch",
"position": [
704,
288
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c4f6d7db-48e4-4733-bb97-f79256367a3b",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "succeeded"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "eafc0f97-f13f-4788-bf2b-55f1dadea642",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "processing"
}
]
}
},
{
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "77a91a1f-9308-4a30-81d5-12ee1730eb07",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "failed"
}
]
}
}
]
},
"options": {},
"looseTypeValidation": true
},
"typeVersion": 3.2
},
{
"id": "50111da0-5ffe-44a6-b88b-1b9d4076a2bd",
"name": "Wait for Task to Complete",
"type": "n8n-nodes-base.wait",
"position": [
80,
400
],
"webhookId": "513e4b72-3aa2-4778-8a96-680bace037a4",
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "3c9afef5-311b-4d81-b8b4-f12b0b2da9b4",
"name": "Send Email: API Error - Task ID Missing",
"type": "n8n-nodes-base.emailSend",
"position": [
1136,
912
],
"webhookId": "d3a0e8f9-c692-4319-b529-f18edc4fd2e4",
"parameters": {
"html": "Hey This Just Inform To You API Doesn't Return task id",
"options": {},
"subject": "Failed To Get Task ID",
"toEmail": "[email protected]",
"fromEmail": "[email protected]"
},
"credentials": {
"smtp": {
"id": "H0f4Gja9ECFRA34L",
"name": "SMTP account 2"
}
},
"typeVersion": 2.1
},
{
"id": "d56935f0-28d9-46ca-b15f-909c47b2bf2f",
"name": "Upload File to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
1216,
192
],
"parameters": {
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "qEkQ8MFn0uSHgAqY",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "ad9ceb04-33d1-4cf2-ab9a-75d53004a8eb",
"name": "Send Email: API Error - Task Failed",
"type": "n8n-nodes-base.emailSend",
"position": [
1424,
544
],
"webhookId": "83a5c0c5-62d2-4959-8e5a-c1d2d2901662",
"parameters": {
"html": "Task id : {{ $json.id }}\nFailed to generate video.",
"options": {},
"subject": "Failed To Generate Image ",
"toEmail": "[email protected]",
"fromEmail": "[email protected]"
},
"credentials": {
"smtp": {
"id": "H0f4Gja9ECFRA34L",
"name": "SMTP account 2"
}
},
"typeVersion": 2.1
},
{
"id": "ec85dde7-4914-461f-8239-0cb477ae8780",
"name": "Set Google Drive Permissions",
"type": "n8n-nodes-base.googleDrive",
"position": [
1536,
288
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"resource": "file",
"operation": "share",
"permissionsUi": {},
"authentication": "oAuth2"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "qEkQ8MFn0uSHgAqY",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "e9c8c1a3-cfbf-4a12-8c57-b8bb11ef41a1",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
832
],
"parameters": {
"height": 240,
"content": "Sends an error email if the task ID is missing in the response."
},
"typeVersion": 1
},
{
"id": "1b017c15-6f41-49f3-bd64-e3d6d1bd59aa",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1152,
128
],
"parameters": {
"height": 240,
"content": "Uploads the processed video to Google Drive."
},
"typeVersion": 1
},
{
"id": "1b1dacd4-5d43-401b-acf5-84a1c2d8bb65",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1472,
240
],
"parameters": {
"height": 208,
"content": "Sets the necessary permissions for the uploaded Google Drive file."
},
"typeVersion": 1
},
{
"id": "6017a066-e271-4136-966d-f6f1a891b938",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
1360,
512
],
"parameters": {
"height": 240,
"content": "Sends an email if the video generation task fails"
},
"typeVersion": 1
},
{
"id": "c6cba207-956c-4596-a16d-309fa7d671aa",
"name": "Condition: Check Task Id",
"type": "n8n-nodes-base.if",
"position": [
240,
656
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bcc58e3d-9609-4ec3-adb9-bc6098205818",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.id }}",
"rightValue": "success"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9127bf63-1513-4f71-8dc5-845ededf15c1",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1776,
240
],
"parameters": {
"height": 272,
"content": "Sends an email if the video generation is completed "
},
"typeVersion": 1
},
{
"id": "0a9a0813-da2b-469c-807f-9c85498a5074",
"name": "Send an email : Video Link",
"type": "n8n-nodes-base.emailSend",
"position": [
1824,
336
],
"webhookId": "4f259ec3-e804-4fc1-a346-d9f894188b9e",
"parameters": {
"html": "=Hey , \nYour video is ready.\nLink : {{ $('Upload File to Google Drive').item.json.webViewLink }}",
"options": {},
"toEmail": "[email protected]",
"fromEmail": "[email protected]"
},
"credentials": {
"smtp": {
"id": "H0f4Gja9ECFRA34L",
"name": "SMTP account 2"
}
},
"typeVersion": 2.1
},
{
"id": "2e201acf-9ad6-4018-9294-e16c74fa0eed",
"name": "Download Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
960,
208
],
"parameters": {
"url": "={{ $json.output }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "c42fff1f-8df9-477c-965c-dbaa676dfcb1",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
528
],
"parameters": {
"height": 272,
"content": " - Triggers the workflow when a form is submitted with a prompt field."
},
"typeVersion": 1
},
{
"id": "6db13b80-0081-46d9-8cf2-10edf1354e78",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
576
],
"parameters": {
"height": 240,
"content": " - Processes the form's prompt by making an API call to the \"Veo 3\" API."
},
"typeVersion": 1
},
{
"id": "5992b1f3-9ed5-462e-b612-be6abe351f07",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
560
],
"parameters": {
"height": 240,
"content": " - Checks if the task ID is present before continuing; sends an error email if missing."
},
"typeVersion": 1
},
{
"id": "b3e4d022-645a-40d4-b219-8b33714260dc",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"height": 256,
"content": " - Waits for 35 seconds to allow the API response to be processed."
},
"typeVersion": 1
},
{
"id": "5dda17d1-398d-4b80-8f5a-a34db1e6aeae",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
16,
304
],
"parameters": {
"height": 256,
"content": " - Waits for 30 seconds before rechecking the task’s completion status."
},
"typeVersion": 1
},
{
"id": "b1440872-5243-489b-bfb4-c7f2b2ddbc47",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
96
],
"parameters": {
"height": 208,
"content": " - Sends an HTTP request to check the status of a task using its ID."
},
"typeVersion": 1
},
{
"id": "a954d6dc-1b64-4d1e-a392-12402835c89a",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
624,
192
],
"parameters": {
"height": 272,
"content": "- Checks the task's output status for success, processing, or failure."
},
"typeVersion": 1
},
{
"id": "6499af47-4f65-4ea3-91ac-1338d35cb6ea",
"name": "Sticky Note12",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
96
],
"parameters": {
"height": 240,
"content": "- Downloads the processed video from the output URL provided by the API response."
},
"typeVersion": 1
},
{
"id": "eb47d2db-f087-4379-b0e6-98d05e27121c",
"name": "Veo 3 API Processor",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
-192,
656
],
"parameters": {
"url": "https://google-veo-3.p.rapidapi.com/predictions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"version\": \"590348ebd4cb656f3fc5b9270c4c19fb2abc5d1ae6101f7874413a3ec545260d\",\n \"input\": {\n \"prompt\": \"{{ $json.Prompt }}\",\n \"enhance_prompt\": true\n }\n}",
"sendBody": true,
"contentType": "=json",
"sendHeaders": true,
"specifyBody": "json",
"bodyParameters": {
"parameters": [
{}
]
},
"headerParameters": {
"parameters": [
{
"name": "x-rapidapi-host",
"value": "google-veo-3.p.rapidapi.com"
},
{
"name": "x-rapidapi-key",
"value": "your key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ecde9574-4afd-4662-8bd2-226c58c41188",
"name": "Sticky Note13",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
32
],
"parameters": {
"width": 704,
"height": 416,
"content": "## CGI Ad Generation Workflow Using Google Veo3\n\nThis workflow automates the process of creating CGI ads with **Google Veo3 API**, involving video generation, downloading, uploading to Google Drive, and email notifications. \n\n### Flow Breakdown:\n1. **Form Submission**: A user submits a prompt that will be used for CGI ad creation.\n2. **API Request to Google Veo3**: The prompt is sent to the **Google Veo3 API** for video creation.\n3. **Wait for Response**: The workflow waits for the API to respond with task status.\n4. **Check Task Status**: The task status is checked for success, failure, or processing.\n5. **Download & Upload to Google Drive**: Once successful, the video is downloaded and uploaded to **Google Drive**.\n6. **Set Permissions**: Permissions for the uploaded video are configured for sharing.\n7. **Email Notification**: A final email is sent with the link to the completed video.\n8. **Error Handling**: If the task ID is missing or the task fails, error emails are sent for troubleshooting.\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Download Video": {
"main": [
[
{
"node": "Upload File to Google Drive",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Veo 3 API Processor",
"type": "main",
"index": 0
}
]
]
},
"Veo 3 API Processor": {
"main": [
[
{
"node": "Condition: Check Task Id",
"type": "main",
"index": 0
}
]
]
},
"Wait for API Response": {
"main": [
[
{
"node": "API Request: Check Task Status",
"type": "main",
"index": 0
}
]
]
},
"Condition: Check Task Id": {
"main": [
[
{
"node": "Wait for API Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Email: API Error - Task ID Missing",
"type": "main",
"index": 0
}
]
]
},
"Wait for Task to Complete": {
"main": [
[
{
"node": "API Request: Check Task Status",
"type": "main",
"index": 0
}
]
]
},
"Upload File to Google Drive": {
"main": [
[
{
"node": "Set Google Drive Permissions",
"type": "main",
"index": 0
}
]
]
},
"Set Google Drive Permissions": {
"main": [
[
{
"node": "Send an email : Video Link",
"type": "main",
"index": 0
}
]
]
},
"Condition: Task Output Status": {
"main": [
[
{
"node": "Download Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait for Task to Complete",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Email: API Error - Task Failed",
"type": "main",
"index": 0
}
]
]
},
"API Request: Check Task Status": {
"main": [
[
{
"node": "Condition: Task Output Status",
"type": "main",
"index": 0
}
]
]
}
}
}