---
title: "Gemini bounding boxes drawn on an image from a prompt"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/a819e9a5-aed6-4ad1-8eca-c03c8235ce43"
updated: "2026-11-12"
---

# Gemini bounding boxes drawn on an image from a prompt

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

An n8n workflow that sends a picture and a short prompt to Google Gemini, then draws the boxes it returns on the picture. The prompt names what to find, and the sample asks for rabbits.

Gemini bounding boxes drawn on an image from a prompt is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. 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 finds things in a picture from a plain sentence. It downloads an image and sends it to Google Gemini with a prompt that names what to find, here rabbits. Gemini answers with a box around each match. A Code node turns the boxes into pixel positions, and an Edit Image node draws them on the picture. Seven nodes run it, beside five sticky notes.

### Who it suits

Builders who want to try prompt based object detection without training a model. Skip it if you need more than six boxes on a picture, exact outlines instead of rectangles, or a service that runs offline.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software | Developers | Test what Gemini finds in their own images | A developer changes the prompt to cars and sees a box on each car in a street photo. |
| E-commerce | Catalogue teams | Mark the items in a product photo | A team asks for shoes and checks that each pair gets a box. |
| Research | Analysts | Check how well a prompt finds a subject | An analyst compares the boxes for two wordings of one prompt. |
| Education | Teachers | Show how a vision model reads a picture | A teacher draws boxes on animals in a classroom photo. |

You need some n8n: import a file, add one credential and paste the address of one picture.

### Where to use it

Any n8n that can reach Google’s API and the address of your picture will run it. The result is a picture you open in the Draw Bounding Boxes node.

- n8n Cloud: import the file there and run it by hand
- Your own n8n server: the same file and steps
- Google Gemini: the model that finds the matches
- Your picture: a JPEG reachable by a web address

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Setup takes one credential and one picture address.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Google Gemini | An API key, saved in a Google Gemini(PaLM) API credential |
| A picture | A JPEG file reachable by a web address |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add that credential with your key and select it in `Gemini Object Detection`.
3. In `Get Test Image`, replace `https://YOUR_IMAGE_HOST/your-image.jpg` with your picture’s address.
4. Change the prompt in the JSON body of `Gemini Object Detection` if you want to find something other than rabbits.
5. Click Test workflow and open `Draw Bounding Boxes` to see the picture.

### How to use it

Click Test workflow. After a few seconds the last node holds your picture with the boxes drawn on it. Change the prompt, and run it again to look for something else.

What to change for a different result

| To change | Where |
| --- | --- |
| What to find | The prompt in \`Gemini Object Detection\` |
| The picture | The address in \`Get Test Image\` |
| The model | The model name in the address of \`Gemini Object Detection\` |
| The look of a box | The colour in each draw step of \`Draw Bounding Boxes\` |

### Example

A teacher saves a classroom photo of rabbits at a web address and pastes it into `Get Test Image`. She clicks Test workflow.

Gemini returns a box and a label for each rabbit it sees. The Code node scales the boxes to the photo’s size, and the last node shows the photo with a box on each rabbit.

### 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. Here one node asks Gemini, one does the sums and one draws. Start with a clear picture that has two or three subjects.

**For experts.** Gemini is called through an HTTP Request node with a response schema that asks for a list of objects with a `box_2d` and a `label`. There is no Gemini node and no AI Agent.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Gemini Object Detection\` | Posts the picture and the prompt to the \`generateContent\` endpoint | The picture goes in as base64 in the JSON body |
| \`Get Variables\` | Reads the model’s text as JSON | It uses \`parseJson\`, so a reply that is not JSON stops the run |
| \`Scale Normalised Coords\` | Turns the 0 to 1000 boxes into pixels and pads them to six | The extra boxes beyond six are cut |
| \`Draw Bounding Boxes\` | Draws six rectangles on the picture | An empty slot becomes a zero size box at the top left corner |

### Good to know

Only six boxes are drawn, and the model name was changed because the original one is not on Google’s current pages.

- The repair: Google’s deprecations page, read on 12 November 2026, does not list the original \`gemini-2.0-flash-exp\`, shows the \`gemini-2.0-flash\` family shut down on 1 June 2026 and names \`gemini-3.6-flash\` as the replacement. This copy uses that
- The fix for few matches: the original failed on a picture with fewer than six matches. The Code node now pads the list
- Box format: Google’s image guide, read on 12 November 2026, gives each box as \`\[ymin, xmin, ymax, xmax\]\` on a scale of 0 to 1000
- Output: the picture stays inside n8n, so add a node to save or send it
- The format: the request marks the picture as JPEG, so other formats need a change in the body
- Large pictures: the request carries the whole picture as text, so a big one makes a big request
- Your data: the picture and the prompt go to Google
- Credentials: the JSON holds none

## README

```markdown
# Gemini bounding boxes drawn on an image from a prompt

An n8n workflow that sends one picture and a short prompt to Google's Gemini. Gemini answers with a box around each match,
and the workflow draws those boxes on the picture. The prompt asks for rabbits, and you can change it to ask for anything
you can name.

## What is inside

- `workflow.json`: the workflow as n8n exports it, twelve nodes: seven that do the work and five sticky notes. It holds no
  credential.
- `README.md`: these notes.

## What we changed from the original copy

- The model was `gemini-2.0-flash-exp`. Google's deprecations page, read on 12 November 2026, does not list that name, but
  it shows the `gemini-2.0-flash` family shut down on 1 June 2026 and names `gemini-3.6-flash` as the replacement. The
  request now goes to `gemini-3.6-flash`.
- The node that asks Gemini was called `Gemini 2.0 Object Detection`. It is now `Gemini Object Detection`, since the model
  changed.
- `Get Test Image` downloaded a picture from the author's own address. It now holds `https://YOUR_IMAGE_HOST/your-image.jpg`.
- `Draw Bounding Boxes` has six fixed draw steps and read a box from each. A picture with fewer than six matches made the
  workflow fail on a missing box. The Code node now pads the list to six, and extra boxes beyond six are cut.
- The sticky notes are rewritten as short notes about each step, without their links. Two are gone: one held a picture of
  the author's own output and one explained why a different node was not used.
- Nothing else.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Google Gemini API key, in a Google Gemini(PaLM) API credential.
- A picture that Gemini accepts, reachable by a web address. The workflow sends it as JPEG, so use a JPEG file.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add that credential with your key and select it in `Gemini Object Detection`.
3. In `Get Test Image`, replace `https://YOUR_IMAGE_HOST/your-image.jpg` with the address of your picture.
4. In `Gemini Object Detection`, change the prompt in the JSON body if you want something other than rabbits.
5. Click Test workflow and open `Draw Bounding Boxes` to see the picture.

## How a run goes

1. `Get Test Image` downloads the picture, and `Get Image Info` reads its width and height.
2. `Gemini Object Detection` posts the picture and the prompt, and asks for a JSON list in which each match has a `box_2d`
   list and a `label`.
3. `Get Variables` reads the model's text as JSON, and keeps the picture's width and height next to it.
4. `Scale Normalised Coords` turns each box into pixel positions and pads the list to six boxes.
5. `Draw Bounding Boxes` draws the six boxes on the picture it holds.

## Change the look

- What to find: the words of the prompt in `Gemini Object Detection`.
- The picture: the address in `Get Test Image`.
- The model: the model name in the address of `Gemini Object Detection`.
- The colour of the boxes: the colour field of each draw step in `Draw Bounding Boxes`.

## Good to know

- Google's image guide, read on 12 November 2026, gives each box as `[ymin, xmin, ymax, xmax]` on a scale of 0 to 1000. The
  Code node turns that into pixels with the picture's width and height.
- Only six boxes are drawn. A seventh match is dropped. For more, add draw steps and extend the padding in the Code node.
- An empty slot becomes a box of zero size at the top left corner, which shows as a dot or nothing. It is not a match.
- `Get Variables` reads the model's text with `parseJson`. If the model answers with something that is not JSON, the run
  stops there.
- The Code node reads the binary picture from `Get Test Image`, so a change to that node's name needs the same change in the
  Code node.
- The request sends the picture as base64 inside the JSON body, so a large picture makes a large request.
- Google's deprecations page also routes `gemini-2.5-pro` and `gemini-2.5-flash` to newer models from 1 December 2026, so
  check the page again before you pick another model.
- The picture goes to Google.
- The JSON holds no credential.
```

## What is in it

3 files, 15 KB, downloaded as a zip.

```text
NOTICE.md  618 B
README.md  4 KB
workflow.json  11 KB
```

## Workflow check

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

- Steps: 7 steps, starting by hand
- 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 4 of its 5 step types. It does not read: Edit Image

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/a819e9a5-aed6-4ad1-8eca-c03c8235ce43)
- [Its page on Mindket](https://mindket.com/p/a819e9a5-aed6-4ad1-8eca-c03c8235ce43)
