Automate 360° virtual try-on video creation for clothing using the Kling API via this comprehensive n8n workflow. Learn how to set up this powerful n8n template for e-commerce media generation.
Download this n8n workflow template and start using it instantly.
E-commerce managers looking to scale product visualization.
Fashion brands needing realistic, high-fidelity virtual models.
Content creators and influencers leveraging AI for fashion media.
Automation specialists seeking advanced n8n templates for generative AI.
This specialized n8n workflow leverages generative AI technology, specifically the Kling model accessed through the PiAPI platform, to create dynamic 360° virtual try-on videos. Traditional media generation is slow and expensive; this n8n automation provides a rapid, programmatic solution. The structured n8n node arrangement handles the multi-step, asynchronous nature of AI task execution—first generating the static try-on image based on model and clothing URLs, and then using that output to generate a short, looping 360° video based on a specified prompt. This entire process is encapsulated within a reliable n8n workflow, making sophisticated AI accessible even without deep coding knowledge. Implementing this n8n template dramatically accelerates media production for online retail.
This robust n8n workflow operates as an automated polling system to handle long-running AI generation tasks:
Preset Parameters n8n node defines the necessary API keys and input URLs (model, dress, or separate upper/lower clothing inputs).Kling Virtual Try-On Task n8n node submits the request for the initial AI try-on image.Wait for Image Generation n8n node and the subsequent Get Kling Virtual Try-On Task n8n node. The Check Data Status n8n node determines if the image generation is complete. If the status is pending, the n8n workflow loops back to wait, demonstrating efficient asynchronous handling.completed, the Switch n8n node directs execution to the Generate kling video n8n node. This submits the second AI task, requesting video generation using the newly generated try-on image URL and the predefined movement prompt.Wait for Video Generation n8n node and the Get Kling Video Task n8n node. The Get Video Data Status n8n node checks for completion, looping until the task finishes successfully.Check Video Data Status n8n node), the Get Final Video URL n8n node extracts and presents the publicly accessible URL of the 360° virtual try-on video. This final n8n node completes the automation.To use this n8n template, follow these steps:
x-api-key from that service.Preset Parameters n8n node and update the following fields:x-api-key: Insert your API key here.modelinput: URL of the model image.dressinput, upperinput, or lowerinput: URLs for the specific clothing items. Ensure you supply the correct combination based on the clothing type.generatevideoprompt: Customize the action prompt (e.g., "Walk on the catwalk, turn around...").When clicking ‘Test workflow’ n8n trigger to ensure connectivity and correct output before activating the workflow for production use.This n8n workflow relies heavily on the HTTP Request and core logic nodes to manage the asynchronous API calls:
When clicking ‘Test workflow’ (n8n trigger):
Function: Initiates this specific n8n workflow for manual execution.
Key Configuration: Standard manual n8n trigger.
Preset Parameters (Set n8n node):
Function: Defines and passes all necessary API keys, model URLs, clothing URLs, and the video prompt used throughout the n8n workflow.
Key Configuration: Raw JSON output defining dynamic input variables.
Kling Virtual Try-On Task (HTTP Request n8n node):
Function: Submits the initial POST request to PiAPI to start the aitryon image generation task, passing the necessary input URLs.
Key Configuration: POST request using expressions to dynamically access inputs and the x-api-key header.
Wait for Image Generation / Wait for Video Generation (Wait n8n node):
Function: Introduces intentional delays (polling intervals) in the n8n workflow to handle the latency of the long-running AI generation tasks.
Key Configuration: Simple wait functionality.
Check Data Status / Get Video Data Status (If n8n node):
Function: Implements the core logic of the polling loop. It checks if the task status is completed or failed. If neither, the n8n workflow loops back to the previous Wait n8n node.
Key Configuration: Checks {{ $json.data.status }} for specific completion values.
Generate kling video (HTTP Request n8n node):
Function: Submits the second POST request to start the videogeneration task, leveraging the successful image resource URL generated by the preceding steps of the n8n workflow.
Key Configuration: POST request using the image URL output and the generatevideoprompt.
Get Final Video URL (Set n8n node):
Function: The final n8n node in the successful path, extracting the generated video URL for downstream use or reporting.
Key Configuration*: Raw JSON output setting the videourl variable.
Generate comprehensive, multi-platform social media intelligence reports automatically using this powerful n8n workflow. Integrates Bright Data MCP, OpenAI agents, and cross-verification logic to deliver formatted Google Docs.

Automate high-volume ad creative production. This n8n workflow uses GPT-4o to analyze inspiration images and Fal.AI Nano Banana to generate 100+ visual variants based on strategic creative recipes. Use this n8n template today.

Generate audio summaries for WordPress articles using this n8n workflow, integrating OpenAI, Eleven Labs Text-to-Speech, and direct WordPress media uploads.

Leverage this advanced n8n workflow to generate complex 3D mesh outputs from images using the fire/part-crafter model on Replicate. This n8n template includes robust polling logic.









































