Skip to main content

Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3)

Workflow preview

Workflow preview
100%
Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

️ 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 ...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.stickynote, n8n-nodes-base.googlesheets, n8n-nodes-base.converttofile, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Jaruphat J..

Original n8n.io source

1.1 Workflow description

Title
Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3)
Workflow name
Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3)

⚠️ 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 and short videos 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 and optionally 5–8s videos.

  • Zone 0 — Image-only pipeline (Gemini/OpenRouter): Creates an ad image from a product link and prompt, uploads it to Drive, and updates the sheet (no video step).
  • Zone 1 — Create image (Fal nano‑banana) + prepare for video: Generates an image via Fal.ai, polls status, fetches URL, then analyzes the image with LLM to prepare scene prompts.
  • Zone 2 — Generate video (WAN2.2 & Veo3): Uses the generated image + structured scene prompts to create short clips, uploads them to Drive, and writes the video URL back to the sheet.

Requirements

  • Fal.ai API key (env: FAL_KEY)
  • Google Sheets / Google Drive OAuth2 credentials
  • OpenAI / Gemini (via OpenRouter) for image analysis or alternative image generation
  • A Google Sheet with columns, e.g.: product | presenter | prompt | img_url | video_url
  • 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/OpenRouter.
  2. Google Sheet: Create the columns above. Paste product image Drive links (the workflow converts them to direct links automatically).
  3. Import the workflow: Use the provided JSON. Confirm node credentials resolve.
  4. Run: Start with Zone 0 to verify image-only flow, then test Zone 1 + Zone 2 for full image→video.

Zone 0 — Create Ad Image (Image-only)

This path is for creating just an image and stopping. It reads the Gemini tab in the Sheet, generates an image via OpenRouter/Gemini, converts base64 to a file, uploads to Drive, and writes back img_url.

Key nodes

  • Get Data1 (Google Sheets) → reads Gemini tab
  • setImgeURL (Set) → converts Drive URLs to direct (uc?export=view&id=...)
  • CreateImagebyOpernRouter (Gemini) → calls google/gemini-2.5-flash-image-preview:free
  • wait20sec (Wait) → small delay
  • setBase64data (Code) → splits data URI into { data, mimeType, fileName }
  • Convert to File → creates binary
  • uploadImagetoGdrive (Google Drive) → uploads image
  • updateImageURL (Google Sheets) → writes back img_url

Zone 1 — Create Image (Fal nano‑banana) + Prepare for Video

Reads product rows, normalizes Drive links, generates image with Fal nano‑banana, polls until complete, fetches the output image URL, then runs an image analysis (OpenAI Vision) to prepare structured text for the video step.

Key nodes

  • Get Data (Google Sheets) → reads nanoBanana tab
  • Edit Fields (Set) → converts Drive links to direct (uc?export=view&id=...)
  • Call Fal.ai API (nanoBanana)POST https://queue.fal.run/fal-ai/nano-banana/edit
  • Get image status / If / Wait / Get the image → job polling until complete
  • Analyze image (OpenAI Vision) → returns structured description (brand text, colors, type, short description)

Zone 2 — Generate Video (WAN2.2 & Veo3)

Creates a 5–8s UGC clip using the generated image + structured scene prompt.

Key nodes

  • Describe Each Scene for Video (AI Agent) → expands analysis + user intent into detailed scene sections (Characters, Scene Background, Camera Movement, Movement in Scene, Sound Design)
  • Structured Output Parser2 (Schema) → enforces consistent JSON structure
  • Veo3 (HTTP)POST /fal-ai/veo3/image-to-video with prompt + image_url
  • Call Fal.ai API (WAN2.2) [Optional]POST /fal-ai/wan/v2.2-a14b/image-to-video
  • Wait for the video / Get the video status / Video status / Get the video → polling loop
  • HTTP Request (Download File) → downloads MP4
  • uploadImagetoGdrive1 (Google Drive) → uploads video
  • updateVideoURL (Google Sheets) → writes back video_url

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

  • Adjust AI prompts to change ad style (funny, luxury, cozy, techy).
  • Change video 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.
  • Video never completes → Check status_url, retry with *-fast models or off‑peak times.

Template metadata

  • Uses: Google Sheets, Google Drive, HTTP Request, Wait/If/Switch, Code, Convert to File, OpenAI/Gemini (optional), Fal.ai models (nano‑banana, WAN2.2, Veo3)
  • Source workflow JSON: Gemini_NanoBanana_Template.json (node names and connections match)

Product Image

Product Image - nano Banana

Product Video - Veo3

Product Video - Wan2.2

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Get Data1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 9 - Convert to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 10 - setImgeURL

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - CreateImagebyOpernRouter (gemini-2.5-flash-image-preview:free)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - wait20sec

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 13 - setBase64data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - uploadImagetoGdrive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 15 - updateImageURL

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 16 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - uploadImagetoGdrive1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 18 - updateVideoURL

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 19 - Call Fal.ai API (WAN2.2)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 21 - Get the image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 23 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 24 - Get image status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Showing the first 24 of 36 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3)
Complexity advanced
Nodes 36
Categories Content Creation, Multimodal AI
Author Jaruphat J.
Published 03 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8205/8205.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate UGC ads from Google Sheets with Fal.ai models (nano-banana, WAN2.2, Veo3) do?

️ 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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.