This workflow automates the creation of AI-generated virtual try-on images for fashion eCommerce stores. Instead of relying on expensive and time-consuming photoshoots, the system uses AI to generate realistic images of models wearing selected clothing items.
This n8n workflow automates the process of generating AI-powered virtual try-on images for a WooCommerce store. It fetches product data from a Google Sheet, uses the Fal.ai Nano Banana model to create an image of a model wearing the clothing item, and then updates both the Google Sheet and the WooCommerce product with the final generated image.
The workflow operates in a sequential, loop-based manner to process multiple products from a spreadsheet. Here is the logical flow:
Manual Trigger & Data Fetch: The workflow starts manually (e.g., by clicking "Test workflow"). It first reads data from a specified Google Sheet, looking for rows where the "IMAGE RESULT" column is empty.
Loop Processing: It loops over each row of data fetched from the sheet. Each row should contain URLs for a model image and a product image, along with a WooCommerce product ID.
API Request to Generate Image: For each item in the loop, the workflow sends a POST request to the Fal.ai Nano Banana API. The request includes the two image URLs and a prompt instructing the AI to create a photo of the model wearing the submitted clothing item.
Polling for Completion: The AI processing is asynchronous. The workflow enters a polling loop: it waits for 60 seconds and then checks the status of the processing request. If the status is not COMPLETED
, it waits and checks again. This loop continues until the image is ready.
Fetching and Storing the Result: Once the status is COMPLETED
, the workflow retrieves the URL of the generated image, downloads the image file, and uploads it to a designated folder in Google Drive.
Updating Systems: The workflow then performs two crucial update steps:
Loop Continuation: After processing one item, the workflow loops back to process the next row in the Google Sheet until all items are complete.
To make this workflow functional, you need to configure three main connections:
Step 1: Prepare the Google Sheet
IMAGE MODEL
, IMAGE PRODUCT
, PRODUCT ID
, and IMAGE RESULT
.IMAGE RESULT
column must be left blank; the workflow will fill it automatically.Step 2: Configure the Fal.ai API Key
Value
field in the Header Auth to be Key YOURAPIKEY
(replacing YOURAPIKEY
with your actual key).Step 3: Set Up WooCommerce API
Contact me for consulting and support or add me on Linkedin.