Generación por lotes de videos de IA - Integración de Freepik Minimax Hailuo con Google Workspace
Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 13 nodos.Utiliza principalmente nodos como Code, Wait, Switch, GoogleDrive, HttpRequest. Generación de videos en masa - Integración de Freepik, Minimax, Hailuo con Google Workspace
- •Credenciales de API de Google Drive
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Credenciales de API de Google Sheets
Nodos utilizados (13)
Categoría
{
"meta": {
"instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "39cea19d-02e6-4431-9d8e-0dc76646d6cd",
"name": "Descargar Video como Base64",
"type": "n8n-nodes-base.httpRequest",
"position": [
128,
1904
],
"parameters": {
"url": "={{ $json.data.generated[0] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "78fa05c7-f18f-4d91-a425-d3760106016e",
"name": "Subir a Google Drive1",
"type": "n8n-nodes-base.googleDrive",
"position": [
256,
2048
],
"parameters": {
"name": "=video - {{ $('Get prompt from google sheet').item.json.Name }} - {{ $('Duplicate Rows2').item.json.run }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn",
"cachedResultUrl": "https://drive.google.com/drive/folders/1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn",
"cachedResultName": "n8n workflows"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "pl7bkYVKthXr65dR",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "ed922804-f614-4dc4-be98-263c803e8382",
"name": "Crear Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-720,
1952
],
"parameters": {
"url": "https://api.freepik.com/v1/ai/image-to-video/minimax-hailuo-02-768p",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $json.Prompt }} "
}
]
},
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "MBOXm1HI3OHfvpZ7",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "4a77b1d7-8e1f-49c0-899c-182ab2866d6f",
"name": "Obtener URL del Video",
"type": "n8n-nodes-base.httpRequest",
"notes": "If the previous node isn't SUCCEEDED yet, re-run \"Get Task Status\" after a short wait.",
"position": [
-496,
1936
],
"parameters": {
"url": "=\nhttps://api.freepik.com/v1/ai/image-to-video/minimax-hailuo-02-768p/{{ $json.data.task_id }}\n\n",
"options": {
"timeout": 120000
},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "MBOXm1HI3OHfvpZ7",
"name": "Header Auth account"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "1a4468a7-753e-4caf-956d-6d07121e0da5",
"name": "Interruptor",
"type": "n8n-nodes-base.switch",
"position": [
-208,
1968
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Completed",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "43a3872d-1597-4265-92df-cb055a049d10",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "COMPLETED"
}
]
},
"renameOutput": true
},
{
"outputKey": "Failed",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d54580f5-e892-475d-b2eb-19dcf216e1e2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "FAILED"
}
]
},
"renameOutput": true
},
{
"outputKey": "Created",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "089f70ab-b693-44c4-bca7-dfee87bd6fee",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "CREATED"
}
]
},
"renameOutput": true
},
{
"outputKey": "In Progress",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "d3086f63-8dd7-421d-a880-877f318c5366",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "IN_PROGRESS"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "25e5774c-ea6d-47bd-bb32-93136982ee16",
"name": "Esperar",
"type": "n8n-nodes-base.wait",
"position": [
32,
2032
],
"webhookId": "a042360e-97f5-49cc-9173-447db7d07ba8",
"parameters": {
"amount": 30
},
"typeVersion": 1.1
},
{
"id": "714ea29e-4834-4da7-aab2-68e2dae8e0a1",
"name": "Duplicar Filas2",
"type": "n8n-nodes-base.code",
"position": [
-1296,
2080
],
"parameters": {
"jsCode": "const original = items[0].json;\n\nreturn [\n { json: { ...original, run: 1 } },\n { json: { ...original, run: 2 } },\n];\n"
},
"typeVersion": 2
},
{
"id": "4c240d7f-5497-4165-b485-3fcb8c0a0baa",
"name": "Iterar sobre Elementos",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-944,
1952
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "34f8f236-4efb-44c8-aead-4dc19d7e2381",
"name": "Obtener prompt de google sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
-1504,
2016
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_u9IxEZINcwKQB15Rfx7C1hM71zeDST58Fz3nRHTCUY/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1_u9IxEZINcwKQB15Rfx7C1hM71zeDST58Fz3nRHTCUY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1_u9IxEZINcwKQB15Rfx7C1hM71zeDST58Fz3nRHTCUY/edit?usp=drivesdk",
"cachedResultName": "freepik prompts"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "HlBW2puZbuCCq8jJ",
"name": "Google Sheets account 3"
}
},
"typeVersion": 4.7
},
{
"id": "3d4d077f-4988-4b70-b3a5-358ecbab19f4",
"name": "Nota Adhesiva17",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1616,
1200
],
"parameters": {
"width": 2032,
"content": "## 📬 Need Help or Want to Customize This?\n📧 [robert@ynteractive.com](mailto:robert@ynteractive.com) \n🔗 [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/)"
},
"typeVersion": 1
},
{
"id": "a310dde0-0eb9-4a18-8e0a-cb9519fd2b9f",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1616,
1376
],
"parameters": {
"color": 5,
"width": 600,
"height": 860,
"content": "\n#### Node Configuration Details:\n\n##### Get prompt from google sheet (Google Sheets)\n- **Document ID**: Your Google Sheet ID (from Step 3)\n- **Sheet Name**: `Sheet1` (or your sheet name)\n- **Operation**: Read\n- **Credentials**: Select your \"Google Sheets account\"\n\n##### Duplicate Rows2 (Code Node)\n- **Purpose**: Creates multiple variations of each prompt\n- **JavaScript Code**:\n```javascript\nconst original = items[0].json;\n\nreturn [\n { json: { ...original, run: 1 } },\n { json: { ...original, run: 2 } },\n];\n```\nGoogle sheet to copy: \nhttps://docs.google.com/spreadsheets/d/1_u9IxEZINcwKQB15Rfx7C1hM71zeDST58Fz3nRHTCUY/edit?usp=sharing"
},
"typeVersion": 1
},
{
"id": "c7610191-4c24-4701-9c3f-bce9feb9e167",
"name": "Nota Adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-992,
1376
],
"parameters": {
"color": 6,
"width": 712,
"height": 860,
"content": "\n##### Loop Over Items (Split in Batches)\n- Processes items in batches to manage API rate limits\n- **Options**: Keep default settings\n- **Reset**: `false`\n\n##### Create Video (HTTP Request)\n- **Method**: `POST`\n- **URL**: `https://api.freepik.com/v1/ai/image-to-video/minimax-hailuo-02-768p`\n- **Authentication**: Generic → HTTP Header Auth\n- **Credentials**: Select your \"Header Auth account\"\n- **Send Body**: `true`\n- **Body Parameters**:\n - **Name**: `prompt`\n - **Value**: `={{ $json.Prompt }}`\n\n##### Get Video URL (HTTP Request)\n- **Method**: `GET`\n- **URL**: `https://api.freepik.com/v1/ai/image-to-video/minimax-hailuo-02-768p/{{ $json.data.task_id }}`\n- **Authentication**: Generic → HTTP Header Auth\n- **Credentials**: Select your \"Header Auth account\"\n- **Timeout**: `120000` (2 minutes)\n- **Purpose**: Polls the API for video completion status\n"
},
"typeVersion": 1
},
{
"id": "6b1c2572-5143-402b-9bdd-8225b187ee4e",
"name": "Nota Adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
1376
],
"parameters": {
"color": 3,
"width": 664,
"height": 860,
"content": "\n##### Switch (Switch Node)\n- **Purpose**: Routes workflow based on video generation status\n- **Conditions**:\n - **Completed**: `{{ $json.data.status }}` equals `COMPLETED`\n - **Failed**: `{{ $json.data.status }}` equals `FAILED`\n - **Created**: `{{ $json.data.status }}` equals `CREATED`\n - **In Progress**: `{{ $json.data.status }}` equals `IN_PROGRESS`\n\n##### Wait (Wait Node)\n- **Amount**: `30` seconds\n- **Purpose**: Waits before re-checking video status\n- **Webhook ID**: Auto-generated for resume functionality\n\n##### Download Video as Base64 (HTTP Request)\n- **Method**: `GET`\n- **URL**: `={{ $json.data.generated[0] }}`\n- **Purpose**: Downloads completed video file\n\n##### Upload to Google Drive1 (Google Drive)\n- **Operation**: Upload\n- **Name**: `=video - {{ $('Get prompt from google sheet').item.json.Name }} - {{ $('Duplicate Rows2').item.json.run }}`\n- **Drive ID**: `My Drive`\n- **Folder ID**: Your Google Drive folder ID (from Step 4)\n- **Credentials**: Select your \"Google Drive account\"\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"25e5774c-ea6d-47bd-bb32-93136982ee16": {
"main": [
[
{
"node": "4a77b1d7-8e1f-49c0-899c-182ab2866d6f",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "39cea19d-02e6-4431-9d8e-0dc76646d6cd",
"type": "main",
"index": 0
}
],
[],
[
{
"node": "25e5774c-ea6d-47bd-bb32-93136982ee16",
"type": "main",
"index": 0
}
],
[
{
"node": "25e5774c-ea6d-47bd-bb32-93136982ee16",
"type": "main",
"index": 0
}
]
]
},
"ed922804-f614-4dc4-be98-263c803e8382": {
"main": [
[
{
"node": "4a77b1d7-8e1f-49c0-899c-182ab2866d6f",
"type": "main",
"index": 0
}
]
]
},
"4a77b1d7-8e1f-49c0-899c-182ab2866d6f": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"714ea29e-4834-4da7-aab2-68e2dae8e0a1": {
"main": [
[
{
"node": "4c240d7f-5497-4165-b485-3fcb8c0a0baa",
"type": "main",
"index": 0
}
]
]
},
"4c240d7f-5497-4165-b485-3fcb8c0a0baa": {
"main": [
[],
[
{
"node": "ed922804-f614-4dc4-be98-263c803e8382",
"type": "main",
"index": 0
}
]
]
},
"78fa05c7-f18f-4d91-a425-d3760106016e": {
"main": [
[
{
"node": "4c240d7f-5497-4165-b485-3fcb8c0a0baa",
"type": "main",
"index": 0
}
]
]
},
"39cea19d-02e6-4431-9d8e-0dc76646d6cd": {
"main": [
[
{
"node": "78fa05c7-f18f-4d91-a425-d3760106016e",
"type": "main",
"index": 0
}
]
]
},
"34f8f236-4efb-44c8-aead-4dc19d7e2381": {
"main": [
[
{
"node": "714ea29e-4834-4da7-aab2-68e2dae8e0a1",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Creación de contenido, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Robert Breen
@rbreenProfessional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.
Compartir este flujo de trabajo