MistralCreativeWritingAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Batch-Generate High-Quality UGC Product Images with Nano Banana

Upload product image to Google Drive → Mistral generates 50 scene prompts → Fal.ai Nano Banana image-to-image → auto-save back to Google Drive

Some experienceStepsWorkflowPromptTip
Who
Content creators, e-commerce operators, marketing teams
You get
Automatically produce 50 UGC-style product images and save them back to the same folder
You need
n8n · fal-ai · google-drive

Constraints

Prerequisites: n8n instance; Fal.ai API key; Google Drive OAuth2 credentials (Client ID/Secret). Product base image should preferably have a white background. The target Google Drive folder and its files must be publicly accessible.

What they did

Template author nasser built an n8n automation: when a user uploads a white-background product image to a designated Google Drive folder, the workflow triggers, uses Mistral to generate 50 different scene prompts, then runs image-to-image generation via Fal.ai's Nano Banana model for each prompt, and finally saves all 50 UGC-style images back to the same folder.

How it went

The author reports an approximate cost of $0.039 per image (source: Cost annotation in description.md). This is an author report, not verified by this site.

Worth knowing

1. The Google Drive folder and its files must be publicly accessible, otherwise Fal.ai cannot read the source image. 2. A white background for the product base image is recommended for better results. 3. You can adjust prompt count and style by modifying the message in the Generate Prompts node; adjust num_images and image_urls in the Generate Image JSON body. 4. Actual cost and generation quality may vary with Fal.ai model updates; test with a small batch first.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Mistral Cloud Chat Model node: connect mistralCloudApi credentials.
  • Google Drive Trigger node: connect Google Drive OAuth2 credentials.
  • Upload file node: connect Google Drive OAuth2 credentials.

Configuration to replace

  • Source template is n8n public workflow #8644 (~17 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Configure credentials and initial node

    In n8n Credentials, connect Google Drive (OAuth2, requires Client ID / Secret). Open the Setup node (Edit Fields) and replace the FalAPIKey value from [YOUR_API_KEY] with your actual Fal.ai API key.

  2. Set up Google Drive trigger

    Configure the Google Drive Trigger node: select specificFolder mode and specify the folder to watch (e.g., UGC). Set event to fileCreated. The folder and its contents must be publicly accessible.

  3. Configure prompt generation node

    The Generate Prompts node uses Mistral Cloud Chat Model + Structured Output Parser. The system prompt sets the role as UGC marketing image expert; the user message uses an n8n expression referencing the uploaded file name to extract the product name, requesting 50 scene prompts.

    Execution prompt · Source text。Generate Prompts node System / Text field

    You are an expert content creator specializing in UGC (User-Generated Content) style marketing images.

    Execution prompt · Source text。Generate Prompts node Messages → messageValues[0] → message field (n8n expression, starts with =)

    =The product the Promote is a {{ $('Google Drive Trigger').item.json.name.match(/^[^.]+/)[0] }}
    
    Your task is to generate 50 creative, diverse, and realistic situations prompts for an image-to-image generation model. Each prompt should describe a different situation or scenario where the product is being used. 
    
    Requirements for each prompt:
    1. Specify the environment or setting (e.g., home, office, kitchen).  
    2. Include a human or realistic context interacting with the product (e.g., holding it, using it, displaying it).  
    3. Highlight at least one functionality or feature of the product in the scene.  
    4. Keep the prompts concise (1–2 sentences), vivid, and visually descriptive.  
    5. Maintain diversity: do not repeat the same type of scene. Include different times of day, moods, activities, or locations.
    
    Output format (JSON array):
    {
          "ugc_prompts": [
                  {"prompt": "First prompt here..."},
                  {"prompt": "Second prompt here..."},
                  ...
                  {"prompt": "Fiftieth prompt here..."}
                          ]
    }
    
    Example input:  
    Product: "Smart Water Bottle"  
    
    Example output:
    {
          "ugc_prompts": [
                    {"prompt": "A young woman jogging in a park, drinking from the Smart Water Bottle, enjoying cold water on a sunny morning."},
                    {"prompt": "A man sitting at his office desk, checking water intake on his Smart Water Bottle synced with his phone."},
                    {"prompt": "A family hiking on a trail, each carrying a Smart Water Bottle to stay hydrated."},...
                         ]
    }
    
    DON'T RETURN ANYTHING ELSE THAN THE JSON!
  4. Execute batch image generation

    The Split Out node splits 50 prompts into individual items; Loop Over Items processes each one. In each iteration, the Generate Image node sends a POST request to Fal.ai (gemini-25-flash-image/edit) with the prompt and product image URL; the Retrieve Image node downloads the generated result.

    Execution prompt · Source text。Generate Image node JSON Body field

    ={
      "prompt": "{{ $json.prompt }}",
      "image_urls": [
    "https://drive.google.com/uc?export=view&id={{ $('Google Drive Trigger').first().json.id }}"
      ],
      "num_images": 1,
      "output_format": "jpeg",
      "sync_mode": false
    }

    Execution prompt · Source text。Generate Image node Header Parameters → Authorization value

    =Key {{ $('Setup').first().json.FalAPIKey }}

    Execution prompt · Source text。Retrieve Image node URL field

    ={{ $json.images[0].url }}
  5. Upload results back to Google Drive

    The Upload file node uploads generated images back to the same Google Drive folder. The file name combines the original product name with the prompt number.

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first

This block is the prompt. Ads are never placed here.

You are setting up an n8n workflow: after uploading a product image, automatically generate 50 UGC-style images via Mistral + Fal.ai Nano Banana and save them back to Google Drive. Please confirm you have a Fal.ai API key and Google Drive OAuth2 credentials ready before configuring nodes step by step.

Replace [YOUR_API_KEY] with your real Fal.ai key; Google Drive folder must be public

Source

Create high quality UGC images with Nano Banana (Cheaper & Faster) · nasser · n8n.io · 2025-09-16

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related