Generate AI product ad images from Google Sheets using Fal.ai and OpenAI
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 (12)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Sheets
n8n-nodes-base.googleSheets - OpenAI
@n8n/n8n-nodes-langchain.openAi - Google Drive
n8n-nodes-base.googleDrive - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Split Out
n8n-nodes-base.splitOut - Wait
n8n-nodes-base.wait - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
What it does
⚠️ 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. Zone 1 — Create Ad Image: Reads product rows, downloads image, analyzes it, generates prompts, appends results back into Google Sheet. Zone 2 — Create Image (Fal nano‑banana): Generates ad image variations, polls Fal.ai API until done, uploads to Drive, and updates sheet with output URLs. --- Requirements Fal.ai API key (env: FAL\KEY) Google Sheets / Google Drive OAuth2 credentials OpenAI (Vision/Chat) for image analysis A Google Sheet with columns for product and output Google Drive files set to Anyone with link → Viewer so APIs can fetch them --- 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 productid | productname | productimageurl | productdescription | campaign | brandnotes | constraints | numvariations | aspectratio | modeltarget | status Sheet: adimage sceneref | productname | prompt | status | outputurl 3. Import the workflow: Use the provided JSON. Confirm node credentials resolve. 4. 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 adimage 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) js {{ (() => { 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 ? any0 : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }} --- How to customize the workflow Adjust AI prompts to change ad style (luxury, cozy, techy). Change aspect ratio for TikTok/IG/Shorts (9:16, 1:1, 16:9). Extend Sheet schema for campaign labels, audiences, hashtags. Add distribution (Slack/LINE/Telegram) after Drive upload. --- Troubleshooting JSON parameter needs to be valid JSON → Ensure expressions return objects, not strings. 403 on images → Make Drive files public (Viewer) and convert links. Job never completes → Check statusurl, retry with -fast models or off‑peak times. --- Template metadata Uses: Google Sheets, Google Drive, HTTP Request, Wait/If/Switch, Code, OpenAI Vision/Chat, Fal.ai models (nano‑banana) --- Visuals Workflow Diagram !Workflow Diagram Example Product Image !Alt text Product Image - nano Banana !Alt text !Alt text !Alt text !Alt text