{
  "name": "Generate consistent styled images from references with Google Gemini and Sheets",
  "nodes": [
    {
      "id": "6b6e8fcf-bb93-42c5-be89-7260d0caff0f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -64,
        368
      ]
    },
    {
      "id": "0c99665c-5c2f-4119-baba-3a1fbcbc8bba",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        144,
        368
      ]
    },
    {
      "id": "507824ec-e131-4477-8d3a-47e2ea4c59b1",
      "name": "Wait #1",
      "type": "n8n-nodes-base.wait",
      "position": [
        928,
        384
      ]
    },
    {
      "id": "3501bc89-a138-415a-ba96-d337934e56c5",
      "name": "Wait #2",
      "type": "n8n-nodes-base.wait",
      "position": [
        2208,
        240
      ]
    },
    {
      "id": "c1c7db36-d2d6-43b9-a4f1-e1911c964f76",
      "name": "Wait #3",
      "type": "n8n-nodes-base.wait",
      "position": [
        2416,
        656
      ]
    },
    {
      "id": "acaa45b5-33c4-45ae-81c0-3c47fe56d7e6",
      "name": "Wait #4",
      "type": "n8n-nodes-base.wait",
      "position": [
        2032,
        656
      ]
    },
    {
      "id": "12a906ec-db30-44e9-993a-cf91d8955b5c",
      "name": "ntfy - Start Alert",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        352,
        176
      ]
    },
    {
      "id": "be1dd045-4748-43d7-ab3d-1aeecee7fd05",
      "name": "ntfy - Task Error Alert",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2064,
        496
      ]
    },
    {
      "id": "8d571483-8930-4044-b908-2464d0cfe1aa",
      "name": "ntfy - Workflow Completion Alert",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        816,
        192
      ]
    },
    {
      "id": "675e11c3-e8ff-4eec-a0e7-737790dc5c35",
      "name": "ntfy - Task Success Alert",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2432,
        32
      ]
    },
    {
      "id": "dce5c96f-121c-469c-8826-8ab89fddd7ab",
      "name": "If  - Check Analysis Result",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        384
      ]
    },
    {
      "id": "f122cc75-368b-46f8-850a-1edae3a90069",
      "name": "If - Check Image Generation",
      "type": "n8n-nodes-base.if",
      "position": [
        1648,
        384
      ]
    },
    {
      "id": "19351547-5932-4704-992d-b66c1c43c6ed",
      "name": "Read – Google Sheets – Pending Prompts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        368
      ]
    },
    {
      "id": "c57fa259-aa2f-4164-9865-e11a9886a995",
      "name": "Split – Process Items Individually",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        576,
        368
      ]
    },
    {
      "id": "fe69679a-fe26-4ac7-a1b1-712692bedc24",
      "name": "Download –  Reference Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        384
      ]
    },
    {
      "id": "cd3e66bd-1c88-4b42-b58b-37510a8cfd00",
      "name": "Analyze – Gemini – Visual Style",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1088,
        384
      ]
    },
    {
      "id": "8640d9a5-67ba-463d-b857-6e4fd536c9ae",
      "name": "Create – Gemini – New Image From Style",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1456,
        272
      ]
    },
    {
      "id": "ba08e170-3cdc-4b1f-9f7e-9c2f57e245d4",
      "name": "ransform – Code – Prepare Image Binary",
      "type": "n8n-nodes-base.code",
      "position": [
        1840,
        240
      ]
    },
    {
      "id": "933f1eca-9c61-41da-9a5f-d85210cbccb5",
      "name": "Upload – Google Drive – Store Generated Image",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2032,
        240
      ]
    },
    {
      "id": "91d2a44c-3be0-44fe-aac9-c10f0473f074",
      "name": "Update – Google Sheets – Success Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2432,
        240
      ]
    },
    {
      "id": "641ea6c1-b3b9-4c84-a3ae-4d0fc8bbebd8",
      "name": "Update – Google Sheets – Error Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1808,
        528
      ]
    },
    {
      "id": "41d55e89-ffb1-4fc4-9f09-e9d638a5cd2c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -96
      ],
      "parameters": {
        "width": 1568,
        "height": 592,
        "content": "## Setup Instructions\n\n- Google Sheets: Create a sheet with columns: gorsel_id, ana_prompt, stil_prompt, referans_url, durum.\n\n- Credentials: Set up and connect Google Sheets, Google Drive, and Google"
      }
    },
    {
      "id": "04d003e2-24a9-4bf8-92eb-105ef60aa9da",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -96
      ],
      "parameters": {
        "width": 1168,
        "height": 672,
        "content": "## Monitoring & Notifications\n\n\nThis workflow uses ntfy.sh for real-time progress updates.\n\n- Topic: Replace the topic name ai-gorsel-uretimi100 in all HTTP Request nodes with your own unique topic.\n\n"
      }
    },
    {
      "id": "c8658fab-e8b1-4022-90bc-241db5d5290f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        496
      ],
      "parameters": {
        "width": 1584,
        "height": 432,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Logic & Error Handling\n\n- Rate Limiting: 'Wait' nodes are strategically placed to prevent hitting API rate limits during bulk processing.\n\n- Looping: The workflow processes images on"
      }
    },
    {
      "id": "eea26e51-711e-4def-96fc-96f88e446a9b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        128
      ],
      "parameters": {
        "width": 432,
        "height": 896,
        "content": "##Main Overview\n\n### How it works\nThis workflow automates a sophisticated image generation pipeline designed to maintain visual consistency by replicating styles from reference images. Triggered via a"
      }
    }
  ],
  "connections": {
    "Wait #1": {
      "main": [
        [
          {
            "node": "Analyze – Gemini – Visual Style",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait #2": {
      "main": [
        [
          {
            "node": "Update – Google Sheets – Success Status",
            "type": "main",
            "index": 0
          },
          {
            "node": "ntfy - Task Success Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait #3": {
      "main": [
        [
          {
            "node": "Split – Process Items Individually",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait #4": {
      "main": [
        [
          {
            "node": "Split – Process Items Individually",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Read – Google Sheets – Pending Prompts",
            "type": "main",
            "index": 0
          },
          {
            "node": "ntfy - Start Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If  - Check Analysis Result": {
      "main": [
        [
          {
            "node": "Create – Gemini – New Image From Style",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update – Google Sheets – Error Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Check Image Generation": {
      "main": [
        [
          {
            "node": "ransform – Code – Prepare Image Binary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update – Google Sheets – Error Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download –  Reference Image": {
      "main": [
        [
          {
            "node": "Wait #1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze – Gemini – Visual Style": {
      "main": [
        [
          {
            "node": "If  - Check Analysis Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split – Process Items Individually": {
      "main": [
        [
          {
            "node": "ntfy - Workflow Completion Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download –  Reference Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update – Google Sheets – Error Status": {
      "main": [
        [
          {
            "node": "Wait #4",
            "type": "main",
            "index": 0
          },
          {
            "node": "ntfy - Task Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create – Gemini – New Image From Style": {
      "main": [
        [
          {
            "node": "If - Check Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read – Google Sheets – Pending Prompts": {
      "main": [
        [
          {
            "node": "Split – Process Items Individually",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ransform – Code – Prepare Image Binary": {
      "main": [
        [
          {
            "node": "Upload – Google Drive – Store Generated Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update – Google Sheets – Success Status": {
      "main": [
        [
          {
            "node": "Wait #3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload – Google Drive – Store Generated Image": {
      "main": [
        [
          {
            "node": "Wait #2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}