Génération de masse de vidéos IA - Intégration Freepik Minimax Hailuo avec Google Workspace

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme Code, Wait, Switch, GoogleDrive, HttpRequest. Génération de masse de vidéos IA - Intégration Freepik Minimax Hailuo avec Google Workspace

Prérequis
  • Informations d'identification Google Drive API
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "39cea19d-02e6-4431-9d8e-0dc76646d6cd",
      "name": "Télécharger la vidéo en 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": "Téléverser vers 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": "Créer une vidéo",
      "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": "Obtenir l'URL de la vidéo",
      "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": "Commutateur",
      "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": "Attente",
      "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": "Dupliquer les lignes2",
      "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": "Boucler sur les éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -944,
        1952
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "34f8f236-4efb-44c8-aead-4dc19d7e2381",
      "name": "Obtenir l'invite depuis 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": "Note adhésive17",
      "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": "Note adhésive2",
      "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": "Note adhésive3",
      "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": "Note adhésive4",
      "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
          }
        ]
      ]
    },
    "1a4468a7-753e-4caf-956d-6d07121e0da5": {
      "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": "1a4468a7-753e-4caf-956d-6d07121e0da5",
            "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
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Robert Breen

Robert Breen

@rbreen

Professional 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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34