{
  "name": "Generate competitor-style image ads from your product photos with Gemini",
  "nodes": [
    {
      "id": "cde8e8f1-fa9a-4d9a-b090-1e58d2f7c8fd",
      "name": "form_trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -800,
        -432
      ]
    },
    {
      "id": "e358408a-4da1-4f75-9e49-b72935f38f9d",
      "name": "download_image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -352,
        -432
      ]
    },
    {
      "id": "af21823c-f491-442d-844e-36ef435f2709",
      "name": "convert_ad_image_to_base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -128,
        -432
      ]
    },
    {
      "id": "9946c255-5b00-4d02-a1b2-0ea702a7186b",
      "name": "get_image",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1216,
        -432
      ]
    },
    {
      "id": "600e07e0-9e55-48c2-9e37-f63c1775e785",
      "name": "set_result",
      "type": "n8n-nodes-base.set",
      "position": [
        992,
        -432
      ]
    },
    {
      "id": "cbf6d842-4292-4e33-8d6b-f17327f8ae44",
      "name": "convert_product_image_to_base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -576,
        -432
      ]
    },
    {
      "id": "d18e9368-edf1-40b2-92fb-109ca6893b40",
      "name": "generate_ad_image_prompt",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        -432
      ]
    },
    {
      "id": "c99b2abb-e1f9-4133-9d8b-0ce22a8ce310",
      "name": "generate_ad_image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        544,
        -432
      ]
    },
    {
      "id": "63bc2fec-26c3-47cc-86df-026f831b9fda",
      "name": "build_prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        -432
      ]
    },
    {
      "id": "c6a71cd4-b74f-4ef2-a098-c82907594c8c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -528
      ],
      "parameters": {
        "width": 694,
        "height": 688,
        "content": "# Image Ad Cloner AI Agent \n\nThis 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 U"
      }
    },
    {
      "id": "fa8c0a9a-ba60-49d7-acf0-a41e54cc995c",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        768,
        -432
      ]
    },
    {
      "id": "4bf93051-3d43-478c-967e-5fb79d333a24",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -528
      ],
      "parameters": {
        "width": 838,
        "height": 352,
        "content": "## 📥  INPUT & IMAGE PREPARATION\nThis section collects the required inputs and prepares images for AI processing.\n"
      }
    },
    {
      "id": "670f8a87-d6f5-4a93-9f0a-01690ff4e008",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        -528
      ],
      "parameters": {
        "width": 646,
        "height": 352,
        "content": "## 🧠  PROMPT ENGINEERING & AI GENERATION\nThis section constructs the instructions and generates the new advertisement.\n\n"
      }
    },
    {
      "id": "f36ee66f-204f-4fc5-899c-f3edd232610e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -528
      ],
      "parameters": {
        "width": 678,
        "height": 352,
        "content": "## 📦 RESULT PROCESSING & OUTPUT\nThis section processes the generated image and prepares the final result.\n\n"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "set_result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_image": {
      "main": [
        []
      ]
    },
    "set_result": {
      "main": [
        [
          {
            "node": "get_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "build_prompt": {
      "main": [
        [
          {
            "node": "generate_ad_image_prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "form_trigger": {
      "main": [
        [
          {
            "node": "convert_product_image_to_base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "download_image": {
      "main": [
        [
          {
            "node": "convert_ad_image_to_base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_ad_image": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_ad_image_prompt": {
      "main": [
        [
          {
            "node": "generate_ad_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert_ad_image_to_base64": {
      "main": [
        [
          {
            "node": "build_prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "convert_product_image_to_base64": {
      "main": [
        [
          {
            "node": "download_image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}