Automate bulk video creation using prompts from Google Sheets and the Freepik Minimax Hailuo API. This powerful n8n workflow manages asynchronous polling and saves the resulting video files directly to Google Drive, providing scalable AI media generation.
Download this n8n workflow template and start using it instantly.
Content creation teams who need to scale video production quickly.
Marketers running large-scale campaigns requiring unique video assets.
Technical users looking for advanced n8n workflow examples involving API polling.
Anyone seeking pre-built n8n templates for AI-driven media automation.
Generating multiple AI videos from a list of prompts can be complex, especially since AI generation APIs are often asynchronous (requiring polling to check status). This powerful n8n workflow solves this by providing a robust, end-to-end automation solution. It begins by reading bulk video prompts from Google Sheets. Crucially, the n8n workflow uses a dedicated polling loop with a 'Wait' n8n node to handle the long processing times of the Freepik Minimax Hailuo API. Once a video is complete, the n8n template downloads the file and uploads it automatically to Google Drive, ensuring efficient resource management and reliable file storage. This complete n8n solution is perfect for high-volume content demands.
This automation begins by using the Google Sheets n8n trigger/node to fetch all rows containing video prompts and associated metadata.
data.status response. To deploy this comprehensive n8n workflow, follow these steps:
Prompt and Name columns. Get prompt from google sheet (Google Sheets n8n node): Function: Reads prompt data from the specified Google Spreadsheet (e.g., Sheet1). Key Configuration: Uses OAuth2 credentials to read Prompt and Name columns.
Duplicate Rows2 (Code n8n node): Function: Duplicates each incoming item to request two unique video generations per prompt. Key Configuration: Simple JavaScript code adds a run property (1 or 2) to each duplicated item.
Loop Over Items (Split in Batches n8n node): Function: Manages flow control, iterating over each prompt variation generated by the previous n8n node before initiating the API call.
Create Video (HTTP Request n8n node): Function: Initiates the AI video generation process via the Freepik API. Key Configuration: POST request to the Minimax Hailuo endpoint, passing ={{ $json.Prompt }} as a body parameter.
Get Video URL (HTTP Request n8n node): Function: Polls the Freepik API using the generated task ID to check the video processing status. Key Configuration: GET request dynamically built with {{ $json.data.taskid }}.
Switch (Switch n8n node): Function: Directs the workflow path based on the video status (COMPLETED, INPROGRESS, etc.). Key Configuration: Conditions match ={{ $json.data.status }} against expected status strings.
Wait (Wait n8n node): Function: Pauses the execution for 30 seconds if the video is not ready, facilitating reliable asynchronous polling within this n8n workflow. Key Configuration: Wait Amount: 30.
Download Video as Base64 (HTTP Request n8n node): Function: Downloads the completed video file content once the generation is finished. Key Configuration: URL set to ={{ $json.data.generated[0] }}.
Deploy a powerful sales agent on WhatsApp using n8n. This advanced n8n workflow integrates OpenAI RAG capabilities with a PDF product catalog, leveraging the WhatsApp n8n trigger and AI Agent n8n node for real-time customer support.

Deploy a powerful movie recommendation RAG chatbot using an n8n workflow, Qdrant vector database, and OpenAI embeddings. This advanced n8n template handles data ingestion and live chat queries.

Build a secure SQLite MCP server using this powerful n8n workflow. Integrate AI agents (like Claude) with your local database for data retrieval and modification. This n8n template enforces security against raw SQL injection.

Automate video publishing to TikTok, Instagram, and YouTube using an advanced n8n workflow. Analyze videos with Gemini AI, generate unique copy, and manage client approvals in Google Sheets.

Use this powerful n8n workflow to automate bulk sharing of Google Drive files and generate direct, confirmed download links. Perfect for large-scale distribution using this robust n8n template.

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.







































