{
  "name": "Generate marketing ad banners with LINE, Gemini, and Nano Banana Pro",
  "nodes": [
    {
      "id": "5533972c-f840-4961-81a4-785762ef1a8b",
      "name": "Main Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        480
      ],
      "parameters": {
        "width": 350,
        "height": 596,
        "content": "# Instant Ad Banner Generator\n\nThis workflow generates professional marketing banners from a simple text description using **Gemini** (for prompt engineering) and **Nano Banana Pro** (for high-quality"
      }
    },
    {
      "id": "93b12061-dd75-43b6-99e7-e56c22cfd58a",
      "name": "Check Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        608
      ]
    },
    {
      "id": "4b92ebb6-7294-4ee3-9353-829dc8485797",
      "name": "Sticky Note ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        480
      ],
      "parameters": {
        "width": 680,
        "height": 345,
        "content": "## 1. Receive & Refine\n1. Extract text from LINE webhook.\n2. Use Gemini to optimize prompt for Japanese marketing.\n3. Generate professional, marketing-focused image prompt."
      }
    },
    {
      "id": "d988d7fb-355f-4c83-aaa9-7cfbfb568b58",
      "name": "Sticky Note 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        480
      ],
      "parameters": {
        "width": 1260,
        "height": 345,
        "content": "## 2. Async Generation (Nano Banana)\n1. Submit task to Nano Banana Pro (via Kie API).\n2. Wait loop (10s) to allow processing.\n3. Check status and extract the final Image URL."
      }
    },
    {
      "id": "d3a2aeb0-7802-4f47-ba67-43673ef0c675",
      "name": "Sticky Note 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        480
      ],
      "parameters": {
        "width": 420,
        "height": 345,
        "content": "## 3. Host & Deliver\n1. Download the generated image.\n2. Upload to AWS S3 (Public Read).\n3. Push the image back to the user via LINE."
      }
    },
    {
      "id": "6c48da33-6903-4e33-aeba-f0a4acf8f90f",
      "name": "LINE Webhook1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -992,
        608
      ]
    },
    {
      "id": "59e827d9-884e-4541-af6a-79b5e511110e",
      "name": "Extract Data1",
      "type": "n8n-nodes-base.code",
      "position": [
        -800,
        608
      ]
    },
    {
      "id": "8176325c-3932-46e6-b444-b81983b65a1a",
      "name": "Optimize Prompt (Marketing)1",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        -624,
        608
      ]
    },
    {
      "id": "afeff72b-2245-489b-b474-8890a6a0b519",
      "name": "Submit to Nano Banana Pro1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -48,
        608
      ]
    },
    {
      "id": "9acb497c-6dd9-416d-b7c0-d0d6ad88e83a",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        112,
        608
      ]
    },
    {
      "id": "6a134248-2a3a-4762-9301-901439a79dee",
      "name": "Wait for Generation1",
      "type": "n8n-nodes-base.wait",
      "position": [
        448,
        608
      ]
    },
    {
      "id": "e76b16dd-a29a-4c68-a5e1-caa7131dfb59",
      "name": "Parse Result1",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        608
      ]
    },
    {
      "id": "a6645fa5-60f1-408c-8bad-a4e055a3a2f6",
      "name": "Download Image1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        608
      ]
    },
    {
      "id": "75005330-f777-42e3-8d26-4ccc31dbee8d",
      "name": "Upload to S",
      "type": "n8n-nodes-base.awsS3",
      "position": [
        1120,
        608
      ]
    },
    {
      "id": "1cdb695f-37cd-48a9-9aba-c3d59a401ec9",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1312,
        608
      ]
    },
    {
      "id": "009e3f6b-aabe-4516-8820-ceea578b31aa",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        -224,
        608
      ]
    }
  ],
  "connections": {
    "Code1": {
      "main": [
        [
          {
            "node": "Submit to Nano Banana Pro1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Check Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to S": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data1": {
      "main": [
        [
          {
            "node": "Optimize Prompt (Marketing)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LINE Webhook1": {
      "main": [
        [
          {
            "node": "Extract Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Result1": {
      "main": [
        [
          {
            "node": "Download Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image1": {
      "main": [
        [
          {
            "node": "Upload to S",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Job Status": {
      "main": [
        [
          {
            "node": "Wait for Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Generation1": {
      "main": [
        [
          {
            "node": "Parse Result1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit to Nano Banana Pro1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Optimize Prompt (Marketing)1": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}