Generate stunning AI product creative images automatically using this powerful n8n workflow. Integrate Defapi and the Nano-Banana model for rapid visual content creation. Download this n8n template now.
Download this n8n workflow template and start using it instantly.
This n8n template is ideal for:
E-commerce Marketers: Quickly needing high-quality product advertisements.
Content Creators: Automating the generation of visual assets using AI.
Product Designers: Testing different creative scenes without manual graphic design.
Automation Specialists: Looking for a complex polling mechanism example within an n8n workflow.
Generating marketing-ready product creatives often involves complex design work. This robust n8n workflow solves this by leveraging the Defapi API and the powerful Google Nano-Banana model to transform a simple product image and text prompt into a sophisticated creative scene.
The system utilizes an interactive form submission (the initial n8n trigger) and manages the entire asynchronous AI generation process, including real-time status polling and final retrieval of the image. This complete automation package makes it easy to deploy advanced image generation capabilities directly through your self-hosted or cloud n8n instance, proving the flexibility of a modern n8n setup.
This automation operates through a seamless, multi-step process, starting with a user submission via an n8n trigger.
Submit Image for Creative Generation form trigger.Send Image Generation Request to Defapi.org API n8n node, initiating the image generation task using the google/nano-banana model.Wait for Image Processing Completion n8n node to allow the external API service to begin processing.Obtain the generated status n8n node sends a query to the Defapi API using the task ID received in Step 2 to check the job status.Check if Image Generation is Complete n8n node evaluates the response. If the status is 'success' (True), the flow proceeds to output the results. If not (False), the workflow loops back to the Wait n8n node, initiating the polling cycle again until the image is ready.Format and Display Image Results n8n node extracts the final creative image URL.Get Your Balance n8n node to fetch the user's remaining credits, which is then displayed via the Show Balance n8n node, completing the full n8n workflow execution.To deploy this powerful n8n workflow template, follow these steps:
Submit Image for Creative Generation n8n trigger is active. Note the generated form URL; this is how users interact with the automation.Send Image Generation Request to Defapi.org API and subsequent n8n nodes.This n8n workflow relies on several key n8n nodes for input, processing, and output:
Submit Image for Creative Generation (Form Trigger): This critical n8n trigger initiates the entire process. It collects the necessary inputs: prompt, imgurl, and the required apikey for authentication.
Send Image Generation Request to Defapi.org API (HTTP Request): Sends a POST request to Defapi, using the dynamic API key from the n8n trigger header. It specifies the google/nano-banana model and includes the prompt and product image URL in the JSON body.
Wait for Image Processing Completion (Wait): A temporary pause (10 seconds) implemented to prevent immediate, redundant polling before the AI task has started, optimizing the n8n workflow loop.
Obtain the generated status (HTTP Request): This n8n node performs the polling action, querying the status endpoint using the task_id derived from the previous step's output.
Check if Image Generation is Complete (If): This conditional n8n node checks if the status field in the API response equals 'success'. This determines whether the n8n workflow should retrieve the results or continue waiting.
Format and Display Image Results (Set): Extracts the final generated image URL from the API response array and formats it for output.
Automate marketing copy generation using this powerful n8n workflow. Trigger content creation via an n8n form, use GPT-4 to write compelling ad copy and CTAs, and instantly log results in Airtable and notify Slack. A must-have n8n template for marketers.

Automate event reporting using an n8n workflow. Triggers via webhook, fetches metrics, uses GPT-4o-mini via an AI Agent for professional report generation, emails stakeholders, and saves data to PostgreSQL.

Use this efficient n8n workflow to generate compelling podcast summaries and SEO keywords from raw transcripts using OpenAI. Results are automatically delivered via a Gmail n8n node.

Generate comprehensive e-commerce assets—including product images, UGC style images with models, and cinematic videos—using this complex n8n workflow integrating Gemini, DeepSeek via OpenRouter, and GoAPI. Utilize this powerful n8n template for media creation.

Learn how to use this powerful n8n workflow to generate high-quality product mockups using Gemini 2.5 Flash via OpenRouter. This custom n8n node automation streamlines design tasks for e-commerce.









































