AI Virtual Try-On for E-commerce Platforms - n8n Workflow

Implement a virtual fitting room on WooCommerce, Shopify, or Prestashop using this advanced n8n workflow. Automate AI image generation for instant try-on results.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

E-commerce site owners (WooCommerce, Shopify, Prestashop) looking to implement virtual fitting features.
Developers seeking ready-made n8n templates for complex AI integration.
Digital marketing teams aiming to boost engagement and reduce clothing returns.
Anyone interested in advanced automation using the n8n node system and external AI services.

Overview

Implementing virtual try-on technology typically requires extensive development, but this powerful n8n workflow provides a low-code solution. This automation seamlessly connects an n8n trigger form with the Fal.run Kling AI model. The workflow solves the problem of high return rates and low customer confidence in online apparel shopping by allowing users to upload a photo of themselves and virtually 'wear' a product available on your site.

By using this n8n automation, you can offer a cutting-edge feature, enhance customer experience, and reduce development overhead. This specific n8n workflow is highly customizable and serves as a robust foundation for integrating AI-powered image generation into any e-commerce platform. It provides an effective demonstration of how complex tasks can be managed using simple n8n templates.

How it Works

The entire process begins with an n8n trigger, specifically the Form Trigger n8n node, where the user submits their image, and the product URL is passed through a hidden field.


  1. Image Upload: The n8n workflow first uploads the user's image to a temporary storage location (an FTP location configured in the FTP n8n node). This step ensures the AI service can access the user-provided image via a public URL.

  2. AI Request Initiation: The Create Image HTTP Request n8n node calls the Fal.run AI API, submitting the publicly accessible user image URL and the garment image URL (derived from the initial n8n trigger). This action initiates the AI try-on generation and returns a unique requestid.

  3. Polling for Completion: Recognizing that AI generation takes time, the n8n workflow enters a robust polling loop. It uses a Wait 10 sec. n8n node followed by the Get status n8n node to repeatedly check the job status using the requestid.

  4. Conditional Check: The Completed? If n8n node determines if the status output equals COMPLETED. If the job is still running (False), the flow loops back to the Wait n8n node. If completed, the n8n workflow proceeds.

  5. Result Retrieval: The Get Url image and Get image n8n nodes retrieve the final output—the virtually tried-on image URL and binary data.

  6. User Display: Finally, a dedicated Form n8n node is used to redirect the user directly to the resulting AI-generated image URL, providing them with an instant visualization of the try-on result. This complete n8n workflow delivers a seamless user experience.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the "New" button -> "Import from JSON". This instantly deploys the n8n templates.

  2. Setup Credentials: You must configure two primary credentials for this n8n workflow to run.

Fal.run API Key: Create an HTTP Header Auth credential for the Fal.run API. Configure it in the Create Image n8n node with the Header Name: Authorization and Value: Key YOURAPIKEY.
FTP/Storage: Configure the FTP credential used in the FTP n8n node, ensuring the path is publicly accessible, or replace the FTP n8n node with a Cloud Storage n8n node (like S3) for temporary image storage.

  1. Configure Form Trigger: Activate the On form submission n8n trigger. Note the webhook URL for integration.

  2. Integrate with E-commerce: To use this automation, integrate it into your e-commerce site (WooCommerce, Shopify, etc.). Create a 'Try On' button that opens the n8n form URL in a pop-up, dynamically passing the product image URL via a query parameter (e.g., ?Product=IMAGE_URL). This feeds the garment data directly to the initial n8n trigger.

  3. Activate: Set the entire n8n workflow status to "Active."

Node Details

On form submission (Form Trigger n8n trigger):
Function: Initiates the n8n workflow upon user submission. It captures the user's image (Me) and the garment's image URL via a hidden input field (Product).
Key Configuration: Collects name, user image (file upload), and a hidden product URL parameter. The webhook acts as the starting n8n trigger.
FTP (n8n node):
Function: Uploads the user's binary image data to a temporary public FTP location, making it accessible for the AI service.
Key Configuration: operation: upload, uses dynamic expressions to create a unique path and filename.
Create Image (HTTP Request n8n node):
Function: The crucial step that sends the human and garment image URLs to the Fal.run AI API to request the virtual try-on generation.
Key Configuration: Method: POST, sends a JSON body containing dynamic URLs for humanimageurl and garmentimageurl.
Wait 10 sec. (Wait n8n node):
Function: A flow control n8n node that deliberately pauses the execution to wait for the asynchronous AI job to potentially complete before polling its status again.
Get status (HTTP Request n8n node):
Function: Queries the Fal.run API endpoint repeatedly to retrieve the current processing status of the virtual try-on request.
Completed? (If n8n node):
Function: Checks if the API status response equals COMPLETED. If not, it routes the execution back to the Wait 10 sec. n8n node, creating the necessary polling loop in this n8n workflow.
Get Url image (HTTP Request n8n node):
Function: Retrieves the final result data, including the public URL for the newly generated AI try-on image.
Form (n8n node):
Function: Finalizes the initial web form transaction by redirecting the customer's browser directly to the URL of the generated image, displaying the try-on result.
Key Configuration: respondWith: redirect, dynamically uses the resulting image URL.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza

Featured*