---
title: "Competitor image ad rebuilt around your product"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/90ec8aaa-1e4a-4efd-b3a0-6bc22e090816"
updated: "2026-11-09"
---

# Competitor image ad rebuilt around your product

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow with a form: send the picture address of a rival’s ad and a photo of your product. Gemini 2.5 Pro plans the swap, and a Gemini image model draws the same ad with your packaging and name in it.

Competitor image ad rebuilt around your product is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-09. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow redraws a competitor’s image ad around your own product. Someone sends a form with the ad’s picture address, a photo of your product and any wording to change. Gemini 2.5 Pro studies both pictures and writes an edit plan that finds every logo, label and line of copy to replace. A Gemini image model then draws the new ad from that plan and both pictures. The result waits in the run as an image file. Ten nodes do the work, beside a sticky note with its title.

### Who it suits

Small brands and freelance ad makers who run still-image ads on Facebook or Instagram and want a first draft built on an ad that already sells in their niche. Skip it if the person filling in the form should get the picture back, or if you need video. As imported, the form only confirms the send.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Supplements and wellness | Founders who run their own ads | Send a rival’s long-running ad with a clean shot of their own tub | A protein brand gets its tub on the gym bench where the rival’s stood. |
| Ecommerce agencies | Ad designers | Make a few drafts for a client before the design round | An agency brings four drafts, each from a different rival ad, to the client’s weekly call. |
| Skincare and beauty | Shop owners | Keep the rival’s layout and set a new offer in \`Additional changes\` | A shop swaps the rival’s discount line for free shipping this week. |
| Food and drink | Marketing leads | Try a rival’s seasonal look with their own bottle or can | A cold brew brand tests a rival’s summer beach ad with its own can. |

You need a little n8n: import a file, add one Header Auth credential, fill a few gaps in a prompt and publish a form. Its author puts setup at about 8 minutes.

### Where to use it

Any n8n that can reach Google’s Gemini API will run it. Plan where the picture goes, since nothing leaves the run.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Ads Manager: download the picture from the run and upload it to your ad yourself
- A drive or a chat: add a node after \`get\_image\` to save the file or send it on

### How to set it up

Get it saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. One Gemini key covers both calls.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Google AI Studio | A Gemini API key, for a Header Auth credential named \`x-goog-api-key\` |
| The rival’s ad | The address of the picture itself, best as a JPEG |
| Your product | A photo of it, best as a PNG with the packaging in clear view |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a Header Auth credential with the name `x-goog-api-key` and your Gemini key as its value. Select it in `generate_ad_image_prompt` and `generate_ad_image`.
3. Open `build_prompt`. Its text has gaps where brand names were cut out, listed in the README. Type in your rival’s name, your product and your brand.
4. In the same text, change the sample label fragments `A`, `AG`, `G` and `G1` to pieces of your rival’s name.
5. Save, open the form’s test address and send one ad.
6. Press Publish, then share the form’s production address.

### How to use it

Open the ad’s picture on its own, copy its address and paste it into `Competitor Image Link`. Attach your product photo, and add any wording change in `Additional changes`, such as a new offer. Send it. The form confirms at once. When the run ends, open it under Executions and download the picture from `get_image`.

What to change for a different result

| To change | Where |
| --- | --- |
| What the plan covers | The prompt in \`build\_prompt\`, which asks for a near copy with your packaging |
| The planning model | The address in \`generate\_ad\_image\_prompt\`, \`gemini-2.5-pro\` |
| The drawing model | The address in \`generate\_ad\_image\`, \`gemini-nano-banana-2.1\` in Mindket’s copy |
| Picture types | \`mime\_type\` in both requests: PNG for your photo, JPEG for the ad |
| The form people see | The title, description and labels in \`form\_trigger\` |

### Example

A cold brew brand finds a rival’s ad with a can on a kitchen counter, the rival’s name on the label and a free trial offer along the bottom. It sends that picture’s address, a PNG of its own can and “Use the line 20% off your first box” as the change.

The planning call answers with a plan: each place the rival’s name shows, what replaces it, and the scene to keep. The image model gets that plan with both pictures, and `get_image` holds what it draws as a file named `data`. Check every label before you use it. A model can leave part of a name behind.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one runs in a straight line: the form, the two pictures turned into text, the plan, the drawing, the file. After your first test, open `generate_ad_image_prompt` and read the plan before you judge the picture.

**For experts.** Both Gemini calls are plain HTTP requests to `generateContent`, with both pictures sent inline as base64.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`generate\_ad\_image\_prompt\` | Sends the prompt and both pictures to \`gemini-2.5-pro\` | The first text part of its answer becomes the next prompt |
| \`generate\_ad\_image\` | Sends that plan and the same pictures to the image model | \`set\_result\` keeps the first part that carries \`inlineData\` |
| \`Wait\` | Pauses before \`set\_result\` | Version 1.1 with no settings waits 5 seconds, after a call that has already answered |
| \`form\_trigger\` | Form Trigger 2.2 with three fields | It answers when the form is sent, so the picture never goes back to the sender |

### Good to know

A wrong link or file type stops a run at Gemini, and the image model in the original copy is gone.

- Models: Google’s deprecations page, read on 3 November 2026, lists \`gemini-2.5-flash-image-preview\` as shut down on 15 January 2026. Mindket’s copy calls \`gemini-nano-banana-2.1\`, the replacement it names
- The planner: the same page gives 1 December 2026 for \`gemini-2.5-pro\`, when Google plans to send its requests to \`gemini-3.8-flash\`
- The link: it must open the picture itself. A Facebook post’s address returns a web page, which Gemini cannot read as an image
- File types: both requests call your photo a PNG and the ad a JPEG, whatever you send. Match them, or change \`mime\_type\`
- Billing: Gemini bills two calls a run, one that reads two pictures and one that draws a picture
- Open form: once the workflow is published, anyone with the form’s address can start a run on your key
- Copying: the prompt asks for a near copy of the rival’s ad. Their photo, layout and words are theirs, so change enough to make it your own and check the ad rules where you sell
- Your data: both pictures and your notes go to Google
- Credentials: the JSON holds none

## README

```markdown
# Competitor image ad rebuilt around your product

An n8n workflow with a three-field form. You send the picture address of a rival's ad, a photo of your product and any
wording you want changed. Gemini 2.5 Pro reads both pictures and plans the swap, and a Gemini image model draws the same
ad with your packaging in it. The picture stays in the run as a file.

## What is inside

- `workflow.json`: the workflow as n8n exports it, eleven nodes, one of them a sticky note that holds only the workflow's
  title. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- `generate_ad_image` called `gemini-2.5-flash-image-preview`, which Google shut down on 15 January 2026. It now calls
  `gemini-nano-banana-2.1`, the replacement on Google's deprecations page, read on 3 November 2026.
- Both Gemini requests were linked to a credential in their author's n8n. The link is gone, so select your own in each.
- Nothing else. The file has no Code node, and its expressions needed no repair.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google AI Studio key for the Gemini API, with access to `gemini-2.5-pro` and `gemini-nano-banana-2.1`.
- The address of the rival's ad picture itself, not of the post around it. A JPEG matches the request as it stands.
- A photo of your product, best as a PNG with the packaging easy to see.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a Header Auth credential. Set its name to `x-goog-api-key` and its value to your Gemini key. Select it in
   `generate_ad_image_prompt` and `generate_ad_image`.
3. Open `build_prompt` and fill the gaps listed under "The prompt's gaps" below.
4. If you will share the form, rename it in `form_trigger`. Its title is `Facebook Ad Thief Form`.
5. Save, open the form's test address and send one ad and one photo.
6. Press Publish, then share the form's production address.

The form confirms at once, and the run goes on behind it. Open the run under Executions and download the picture from
`get_image`.

## The prompt's gaps

`build_prompt` holds the instructions for Gemini 2.5 Pro. The brand names were cut out of its copy, so a few
sentences stop short:

| Where in the text | What goes there |
|---|---|
| After `text that says` and `labels on products that say` | Your rival's brand name, as it shows on their ads |
| After `promotes our product` | Your product's name |
| After `switching competitor brand name to our name` | Your brand name |
| The fragments `"A"`, `"AG"`, `"G"` and `"G1"` | Pieces of your rival's name that a cropped label might show |

The prompt runs without them. Gemini then has to guess which name to remove and which to write.

## How a run goes

1. `form_trigger` (Form Trigger 2.2) takes three fields: `Competitor Image Link`, `Your Product Image` (one file) and
   `Additional changes` (optional).
2. `convert_product_image_to_base64` turns your photo into base64 text. `download_image` fetches the rival's picture
   from its address, and `convert_ad_image_to_base64` turns it into text too.
3. `build_prompt` sets the instructions, with your `Additional changes` at the end.
4. `generate_ad_image_prompt` sends the instructions and both pictures to `gemini-2.5-pro`. Its answer is the edit plan.
5. `generate_ad_image` sends that plan and both pictures to `gemini-nano-banana-2.1`, which answers with a picture.
6. `Wait` pauses 5 seconds. `set_result` keeps the picture's base64 data, and `get_image` turns it into a file named
   `data`.

## Change the look

- The plan: the instructions in `build_prompt`. As written, they ask for a near copy of the rival's ad, with the brand,
  the packaging and the words you name changed.
- Models: the addresses in `generate_ad_image_prompt` and `generate_ad_image`.
- Picture types: `mime_type` in the JSON body of both requests, `image/png` for your photo and `image/jpeg` for the ad.
- The form: the title, the description and the field labels in `form_trigger`. If you rename `Your Product Image`, set
  `binaryPropertyName` in `convert_product_image_to_base64` to the new label, with underscores for spaces.
- Where the picture goes: add a node after `get_image`, such as Google Drive, Gmail or Slack.

## Good to know

- The link must open the picture itself. A Facebook post's address returns a web page, which Gemini cannot read as an
  image. Open the ad's picture on its own and copy that address.
- Both requests call your photo a PNG and the ad a JPEG, whatever you send. Send those types, or change `mime_type`.
- `Wait` comes after a call that has already answered, so it only adds 5 seconds. You can delete it.
- Google's deprecations page gives 1 December 2026 for `gemini-2.5-pro`. From that day Google plans to send its requests
  to `gemini-3.8-flash`, so change the address in `generate_ad_image_prompt` first if you want to pick the model yourself.
- Each run is two Gemini calls: one reads two pictures and writes a plan, the other draws a picture.
- Once the workflow is published, anyone with the form's address can start a run on your key.
- The rival's photo, layout and words belong to them. Change enough to make the ad your own, and check the advertising
  rules where you sell before it runs.
- Both pictures and your notes go to Google.
```

## What is in it

2 files, 15 KB, downloaded as a zip.

```text
README.md  5 KB
workflow.json  10 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 10 steps, starting on a form
- AI: No step calls an AI model
- Sign-ins: Signs in to: Google Gemini
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 6 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/90ec8aaa-1e4a-4efd-b3a0-6bc22e090816)
- [Its page on Mindket](https://mindket.com/p/90ec8aaa-1e4a-4efd-b3a0-6bc22e090816)
