🎬 Generate AI product ad images from Google Sheets using Fal.ai and OpenAI

⚡ 516 views · 🎬 Content Creation & Video

💡 Pro Tip — Since TikTok doesn’t have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments — drop it into your workflow and skip the parsing.

View All Scrapers

Description

⚠️ Note: All sensitive credentials should be set via n8n Credentials or environment variables. Do not hardcode API keys in nodes.


Who’s it for

Marketers, creators, and automation builders who want to generate UGC-style ad images automatically from a Google Sheet. Ideal for e‑commerce SKUs, agencies, or teams that need many variations quickly.


What it does (Overview)

This template turns a spreadsheet row into ad images ready for campaigns.


Requirements


How to set up

  1. Credentials: Add Google Sheets + Google Drive (OAuth2), Fal.ai (Header Auth with Authorization: Key {{$env.FAL_KEY}}), and OpenAI.
  2. Google Sheet: Create sheets with the following headers.

Sheet: product

product_id | product_name | product_image_url | product_description | campaign | brand_notes | constraints | num_variations | aspect_ratio | model_target | status

Sheet: ad_image

scene_ref | product_name | prompt | status | output_url
  1. Import the workflow: Use the provided JSON. Confirm node credentials resolve.
  2. Run: Start with Zone 0 to verify prompt-only flow, then test Zone 1 for image generation.

Zone 1 — Create Ad Image (Prompt-only)

Reads product row, normalizes Drive link, analyzes image, generates structured ad prompts, appends to ad_image sheet.


Zone 2 — Create Image (Fal nano‑banana)

Reads product row, converts Drive link, generates image(s) with Fal nano‑banana, polls until complete, uploads to Drive, updates sheet.


Node settings (high‑level)

Drive Link Parser (Set)

{{ (() => {
  const u = $json.product || '';
  const q = u.match(/[?&]id=([\-\w]{25,})/);
  const d = u.match(/\/d\/([\-\w]{25,})/);
  const any = u.match(/[\-\w]{25,}/);
  const id = q?.[1] || d?.[1] || (any ? any[0] : '');
  return id ? 'https://drive.google.com/uc?export=view&id=' + id : '';
})() }}

How to customize the workflow


Troubleshooting


Template metadata


Visuals

Workflow Diagram

Workflow Diagram

Example Product Image

Alt text

Product Image - nano Banana

Alt text Alt text Alt text Alt text

đź”— Nodes Used

Google Sheets, HTTP Request, Google Drive, AI Agent, OpenAI Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup