Generate AI images in bulk with Freepik, Google Sheets & Drive
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (8)
- Manual Trigger
n8n-nodes-base.manualTrigger - Convert to File
n8n-nodes-base.convertToFile - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Google Drive
n8n-nodes-base.googleDrive - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
What it does
This n8n workflow automates bulk AI image generation using Freepik's Text-to-Image API. It reads prompts from a Google Sheet, generates multiple variations of each image using Freepik's AI, and automatically uploads the results to Google Drive with organized file names. This is perfect for content creators, marketers, or designers who need to generate multiple AI images in bulk and store them systematically. Key Features: - Bulk image generation from Google Sheets prompts - Multiple variations per prompt (configurable duplicates) - Automatic file naming and organization - Direct upload to Google Drive - Batch processing for efficient API usage - Freepik AI-powered image generation Step-by-Step Implementation Guide Prerequisites Before setting up this workflow, you'll need: 1. n8n instance (cloud or self-hosted) 2. Freepik API account with Text-to-Image access 3. Google account with access to Sheets and Drive 4. Google Sheet with your prompts Step 1: Set Up Freepik API Credentials 1. Go to Freepik API Developer Portal 2. Create an account or sign in 3. Navigate to your API dashboard 4. Generate an API key for Text-to-Image service 5. Copy the API key and save it securely 6. In n8n, go to Credentials → Add Credential → HTTP Header Auth 7. Configure as follows: - Name: "Header Auth account" - Header Name: x-freepik-api-key - Header Value: Your Freepik API key Step 2: Set Up Google Credentials Google Sheets Access: 1. Go to Google Cloud Console 2. Create a new project or select existing one 3. Enable Google Sheets API 4. Create OAuth2 credentials 5. In n8n, go to Credentials → Add Credential → Google Sheets OAuth2 API 6. Enter your OAuth2 credentials and authorize with spreadsheets.readonly scope Google Drive Access: 1. In Google Cloud Console, enable Google Drive API 2. In n8n, go to Credentials → Add Credential → Google Drive OAuth2 API 3. Enter your OAuth2 credentials and authorize Step 3: Create Your Google Sheet 1. Create a new Google Sheet: sheets.google.com 2. Set up your sheet with these columns: - Column A: Prompt (your image generation prompts) - Column B: Name (identifier for file naming) 3. Example data: | Prompt | Name | |-------------------------------------------|-------------| | A serene mountain landscape at sunrise | mountain-01 | | Modern office space with natural lighting | office-02 | | Cozy coffee shop interior | cafe-03 | 4. Copy the Sheet ID from the URL (the long string between /d/ and /edit) Step 4: Set Up Google Drive Folder 1. Create a folder in Google Drive for your generated images 2. Copy the Folder ID from the URL when viewing the folder 3. Note: The workflow is configured to use a folder called "n8n workflows" Step 5: Import and Configure the Workflow 1. Copy the provided workflow JSON 2. In n8n, click Import from File or Import from Clipboard 3. Paste the workflow JSON 4. Configure each node as detailed below: Node Configuration Details: Start Workflow (Manual Trigger) - No configuration needed - Used to manually start the workflow Get Prompt from Google Sheet (Google Sheets) - Document ID: Your Google Sheet ID (from Step 3) - Sheet Name: Sheet1 (or your sheet name) - Operation: Read - Credentials: Select your "Google Sheets account" Double Output (Code Node) - Purpose: Creates multiple variations of each prompt - JavaScript Code: javascript const original = items0.json; return { json: { ...original, run: 1 } }, { json: { ...original, run: 2 } }, ; - Customization: Add more runs for additional variations Loop (Split in Batches) - Processes items in batches to manage API rate limits - Options: Keep default settings - Reset: false Create Image (HTTP Request) - Method: POST - URL: https://api.freepik.com/v1/ai/text-to-image - Authentication: Generic → HTTP Header Auth - Credentials: Select your "Header Auth account" - Send Body: true - Body Parameters: - Name: prompt - Value: ={{ $json.Prompt }} Split Responses (Split Out) - Field to Split Out: data - Purpose: Separates multiple images from API respo