Use this powerful n8n workflow to automate bulk text-to-image generation from Google Sheets prompts using the Flux AI API, handling base64 conversion, Google Drive uploads, and error logging.
Download this n8n workflow template and start using it instantly.
• Content Agencies needing to generate hundreds of marketing visuals quickly.
• Marketers managing product catalogs or social media content at scale.
• Developers looking for robust n8n templates integrating AI APIs with cloud storage.
• Users seeking a reliable n8n node combination for data fetching, processing, and file handling.
Managing large-scale image generation can be tedious. This powerful n8n workflow solves this by reading numerous text prompts directly from a Google Sheet, executing image generation via the Text To Image Flux AI API (using RapidAPI), and handling the entire backend process—including base64 decoding, file conversion, Google Drive uploading, and logging the results.
This robust n8n automation ensures that only prompts without existing outputs are processed, thanks to a conditional n8n node, preventing wasteful reprocessing. It also incorporates error handling and a crucial 'Wait' step to manage API rate limits, making this one of the most reliable n8n templates for high-volume AI asset creation.
This comprehensive n8n workflow is initiated manually, making it a controlled process for bulk runs.
Google Sheets2 n8n node reads all existing rows (containing image prompts) from your designated spreadsheet.Loop Over Items n8n node processes each row individually, ensuring sequential execution to manage resources.If2 n8n node checks two conditions: if the Prompt field is populated and if the drive path column is empty. Only items needing generation continue.HTTP Request1 n8n node sends the text prompt to the Flux AI API via RapidAPI, receiving the generated image data as a base64 encoded string.If1 n8n node immediately checks the API response for an error key. If an error is found, the data is routed to Google Sheets4 to log the failure.Code1 n8n node converts the massive base64 string into a binary JPEG file, ready for storage.Google Sheets1 n8n node updates the original sheet row with the base64 data and a timestamp.Google Drive1 n8n node uploads the binary image file to the specified Google Drive folder.Wait n8n node, which pauses for 10 seconds before the loop continues with the next prompt, maintaining stable operation and respecting API limits. This careful structure makes it a highly efficient n8n workflow.To deploy and utilize this n8n workflow, follow these setup steps:
Google Sheets2, Google Sheets1, Google Sheets4, and Google Drive1). Ensure this service account has edit access to your Google Sheet and write access to the target Google Drive folder.HTTP Request1 n8n node with your RapidAPI Host and Key headers. The current setup includes a placeholder key (your key).Google Sheets2 node, specify the Document ID and Sheet Name where your prompts are located. Ensure your sheet has columns like Prompt and drive path.Google Drive1 n8n node, specify the Folder ID where the generated images should be saved.This n8n workflow relies on several specialized nodes to manage data flow and AI integration:
When clicking ‘Execute workflow’ (Manual Trigger n8n trigger):
Function: Serves as the immediate starter for the n8n workflow, allowing manual control over bulk processing runs.
Key Configuration: Standard manual activation.
Google Sheets2 (n8n node):
Function: Reads all input data from the designated Google Sheet, fetching the list of prompts.
Key Configuration: Operation: Read, Authentication: Service Account.
Loop Over Items (Split In Batches n8n node):
Function: Ensures that each row (prompt) is processed sequentially through the subsequent AI and storage steps, essential for managing rate limits and data context.
Key Configuration: Splits items into individual batches.
HTTP Request1 (n8n node):
Function: Sends the text prompt dynamically (={{ $json.Prompt }}) to the external Flux AI endpoint, retrieving the image data.
Key Configuration: Method: POST, URL: https://text-to-image-flux-ai.p.rapidapi.com/flux.php, Headers require x-rapidapi-key.
Code1 (n8n node):
Function: Crucial for data preparation. It takes the returned image_base64 string from the API, cleans it (removes prefixes), converts it into a binary Buffer, and sets the mime type (image/jpeg) for subsequent file operations.
Key Configuration: Custom JavaScript code for base64 to binary conversion.
Google Drive1 (n8n node):
Function: Uploads the newly created binary image file to a specified folder in Google Drive.
Key Configuration: Resource: File, Operation: Upload, Folder ID and Drive ID must be set.
Wait (n8n node):
Function: Enforces a 10-second pause after each item is processed (or fails), effectively throttling the execution speed to prevent API rate limit issues. This is a best practice for high-throughput n8n templates.
Use this powerful n8n workflow to build a Telegram bot that enhances user text requests using the Gemini 2.5 Pro model and generates high-quality images via the Gemini 2.0 Image Generation API. Install this n8n template easily.

Use this powerful n8n workflow to generate AI images via Flux AI, convert the base64 output using a custom n8n node, and automatically log results in Google Sheets and upload to Google Drive.

This powerful n8n workflow automates text-guided image editing using the Bytedance Seededit 3.0 model on Replicate. Learn how to build reliable polling loops in n8n templates.

Automate high-quality Instagram posting using AI Agents (GPT) to generate both captions and custom images (DALL-E). This advanced n8n workflow supports style routing, cloud storage handling, and direct publication, perfect for content creators.

Use this robust n8n workflow to automate client onboarding. Triggered by a form, it creates Monday.com items, generates templated Google Drive folders, and sends personalized welcome emails.









































