{
  "name": "Prompt-based object detection with Gemini 2.0",
  "nodes": [
    {
      "id": "bae5d407-9210-4bd0-99a3-3637ee893065",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1440,
        -280
      ]
    },
    {
      "id": "c5a14c8e-4aeb-4a4e-b202-f88e837b6efb",
      "name": "Get Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -200,
        -180
      ]
    },
    {
      "id": "f24017c9-05bc-4f75-a18c-29efe99bfe0e",
      "name": "Get Test Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1260,
        -280
      ]
    },
    {
      "id": "c0f6a9f7-ba65-48a3-8752-ce5d80fe33cf",
      "name": "Gemini 2.0 Object Detection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -680,
        -180
      ]
    },
    {
      "id": "edbc1152-4642-4656-9a3a-308dae42bac6",
      "name": "Scale Normalised Coords",
      "type": "n8n-nodes-base.code",
      "position": [
        -20,
        -180
      ]
    },
    {
      "id": "e0380611-ac7d-48d8-8eeb-35de35dbe56a",
      "name": "Draw Bounding Boxes",
      "type": "n8n-nodes-base.editImage",
      "position": [
        400,
        -180
      ]
    },
    {
      "id": "52daac1b-5ba3-4302-b47b-df3f410b40fc",
      "name": "Get Image Info",
      "type": "n8n-nodes-base.editImage",
      "position": [
        -1080,
        -280
      ]
    },
    {
      "id": "0d2ab96a-3323-472d-82ff-2af5e7d815a1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -460
      ],
      "parameters": {
        "width": 440,
        "height": 380,
        "content": "Fig 1. Output of Object Detection\n![](https://res.cloudinary.com/daglih2g8/image/upload/f_auto,q_auto/v1/n8n-workflows/download_1_qmqyyo#full-width)"
      }
    },
    {
      "id": "c1806400-57da-4ef2-a50d-6ed211d5df29",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -480
      ],
      "parameters": {
        "width": 600,
        "height": 420,
        "content": "## 1. Download Test Image\n[Read more about the HTTP node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nAny compatible image will do ([see docs](https://ai.google.de"
      }
    },
    {
      "id": "3ae12a7c-a20f-4087-868e-b118cc09fa9a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -480
      ],
      "parameters": {
        "width": 560,
        "height": 540,
        "content": "## 2. Use Prompt-Based Object Detection\n[Read more about the HTTP node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nWe've had generalised object detection before ("
      }
    },
    {
      "id": "35673272-7207-41d1-985e-08032355846e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -400
      ],
      "parameters": {
        "width": 520,
        "height": 440,
        "content": "## 3. Scale Coords to Fit Original Image\n[Read more about the Code node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)\n\nAccording to the Gemini 2.0 overview on [how it calc"
      }
    },
    {
      "id": "d3d4470d-0fe1-47fd-a892-10a19b6a6ecc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        80
      ],
      "parameters": {
        "width": 340,
        "height": 100,
        "content": "### Q. Why not use the Basic LLM node?\nAt time of writing, Langchain version does not recognise Gemini 2.0 to be a multimodal model."
      }
    },
    {
      "id": "5b2c1eff-6329-4d9a-9d3d-3a48fb3bd753",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -400
      ],
      "parameters": {
        "width": 500,
        "height": 440,
        "content": "## 4. Draw!\n[Read more about the Edit Image node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.editimage/)\n\nFinally for this demonstration, we can use the \"Edit Image\" node to dr"
      }
    },
    {
      "id": "965d791b-a183-46b0-b2a6-dd961d630c13",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1960,
        -740
      ],
      "parameters": {
        "width": 420,
        "height": 680,
        "content": "## Try it out!\n### This n8n template demonstrates how to use Gemini 2.0's new Bounding Box detection capabilities your workflows.\n\nThe key difference being this enables prompt-based object detection f"
      }
    }
  ],
  "connections": {
    "Get Variables": {
      "main": [
        [
          {
            "node": "Scale Normalised Coords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image Info": {
      "main": [
        [
          {
            "node": "Gemini 2.0 Object Detection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Test Image": {
      "main": [
        [
          {
            "node": "Get Image Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Draw Bounding Boxes": {
      "main": [
        []
      ]
    },
    "Scale Normalised Coords": {
      "main": [
        [
          {
            "node": "Draw Bounding Boxes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.0 Object Detection": {
      "main": [
        [
          {
            "node": "Get Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Test Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}