workflows.fit
Back to n8n workflows
n8n templateFreeBy Pratyush Kumar Jha

Generate competitor-style image ads from your product photos with Gemini

Image Ad Cloner AI Agent This n8n workflow automates “cloning” a competitor ad style and re-generating it using your product image. A user uploads your product image and provides a competitor ad URL via a form trigger...

DevelopmentCore NodesForm TriggerHttp RequestExtract From FileConvert To File
Loading interactive preview...

Template notes

Image Ad Cloner AI Agent

This n8n workflow automates “cloning” a competitor ad style and re-generating it using your product image. A user uploads your product image and provides a competitor ad URL via a form trigger; the workflow downloads both images, converts them to inline/base64 parts, builds a detailed generation prompt, sends the request to a generative-vision model (Gemini-style endpoints), waits for the result, converts the output back to a file and returns it. Use-cases: rapid ad iteration, creative A/B variants, and scaled ad re-skins.

---

How it works (step-by-step) 1. formtrigger — user submits: competitor image URL, their product file, and optional changes. 2. convertproductimagetobase64 — converts uploaded product file to base64 inline data. 3. downloadimage — fetches the competitor ad image from the provided URL. 4. convertadimagetobase64 — converts downloaded competitor image to base64 inline data. 5. buildprompt — assembles a careful prompt (handles partial text, labels, placements, CTA swaps, additional changes). 6. generateadimageprompt → generateadimage — two HTTP Request nodes call generative endpoints (first to prepare prompt/content and then flash-image generation). These include inline image data and model-specific parameters. 7. Wait — allows async generation to complete (workflow uses a wait/webhook pattern). 8. setresult → getimage — extract image result, convert binary to file for downstream use (download or return to the requester). 9. Sticky Note — visual diagram / docs inside workflow.

---

Quick Setup Guide 👉 [Demo & Setup Video](https://drive.google.com/file/d/1PLFPHSXQ-DaNAKeBQv7G9SzaXT0c3hRt/view?usp=sharing) 👉 [Course](https://www.udemy.com/course/n8n-automation-mastery-build-ai-powered-enterprise-ready/?referralCode=2EAE71591D3BEB80F2CC)

---

Nodes of interest - formtrigger (n8n-nodes-base.formTrigger) — entry point; validates inputs. - convertproductimagetobase64 & convertadimagetobase64 (extractFromFile) — convert uploaded/downloaded binaries to inline/base64 data for the model. - downloadimage (httpRequest) — fetches competitor image URL. Add robust URL validation. - buildprompt (set) — builds the natural-language prompt that instructs the model how to replace branding, packaging, and CTAs. - generateadimageprompt & generateadimage (httpRequest) — POST to generative APIs (examples use Gemini endpoints). Have retry/backoff settings. - Wait — used to allow model generation to complete before extracting results. - setresult / getimage / convertToFile — assemble the final binary file to deliver to the user.