See llms.txt for all machine-readable content.

Back to Templates

Generate bulk FLUX images from Google Sheets prompts with Apify

Quick overview

This workflow reads image prompts from Google Sheets, sends them in a single batch to the Apify Bulk AI Image Generator actor (FLUX) to generate images, and writes each image URL plus metadata (size, seed, status, errors) back to the same sheet.

How it works

  1. Starts manually when you run the workflow.
  2. Reads all rows from a Google Sheets worksheet and collects every non-empty value from the prompt column.
  3. Sends the full prompt list in one request to Apify’s sherwood~image-generator-batch actor to generate one PNG image per prompt (for example, square_hd with standard quality).
  4. Sorts the actor results by prompt index and matches each generated image (or error) back to its original Google Sheets row number.
  5. Updates the same Google Sheets rows with image_url, width, height, seed, status, and error values.

Setup

  1. Create an Apify account and add an Apify API token credential in n8n for the Apify node.
  2. Connect your Google Sheets account in n8n and select the target spreadsheet and worksheet in both the read and update steps.
  3. Ensure your sheet includes a prompt column and add output columns such as image_url, width, height, seed, status, and error, with row_number available for matching updates.
  4. Adjust the Apify actor input (for example imageSize, quality, outputFormat, and imagesPerPrompt) to match your desired model and image settings.

Requirements

  • An Apify account with an API token (the Actor is pay per image, about $0.01 per 1024×1024 image, no subscription) and a Google account with access to the spreadsheet.

Customization

  • Raise imagesPerPrompt for up to 4 variations per prompt, switch quality to fast (FLUX Schnell, cheaper) for drafts, chain an image upscaler Actor on the result dataset, or replace the manual trigger with a form or schedule. The Apify node caps each run at $5 by default; raise it for bigger batches.

Additional info

Failed or safety-flagged prompts come back with status = error and the reason in the error column; they are not charged and no row is silently dropped. The Actor returns results in finishing order, which is why the workflow sorts them by prompt index before writing.