{
  "name": "Create stylized product photography with Airtable & Gemini Nano Banana",
  "nodes": [
    {
      "id": "9d581fc1-2b21-41f2-b61f-e1b2984eba34",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -544,
        -48
      ]
    },
    {
      "id": "0cf73e67-9194-4fb8-af9c-05604e337d40",
      "name": "Get Job",
      "type": "n8n-nodes-base.airtable",
      "position": [
        0,
        -48
      ]
    },
    {
      "id": "0a022036-95d0-4409-8a61-60afe3c767eb",
      "name": "Clean up",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        -48
      ]
    },
    {
      "id": "1e5d84ca-72c4-462f-b5a8-68861652eb65",
      "name": "Split products",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -256,
        512
      ]
    },
    {
      "id": "0c3dfd3a-0871-4a7b-9252-6070289d8a9e",
      "name": "Get products",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -48,
        512
      ]
    },
    {
      "id": "a3487dd1-d051-447e-8f38-dd4150ad4a9e",
      "name": "Split templates",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -304,
        880
      ]
    },
    {
      "id": "bbfb9c8b-7356-4dcf-b028-9d9b320b4a76",
      "name": "Get templates",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -96,
        880
      ]
    },
    {
      "id": "a161d2a7-1487-4676-9a01-b34a9d5de3f3",
      "name": "Edit products",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        512
      ]
    },
    {
      "id": "0c2ea55a-6403-4cc6-9d5b-cc0923a0c700",
      "name": "Edit templates",
      "type": "n8n-nodes-base.set",
      "position": [
        112,
        880
      ]
    },
    {
      "id": "0be8b4ac-5135-49bf-902f-898ea1fc292f",
      "name": "Loop over templates",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        320,
        1056
      ]
    },
    {
      "id": "f0ccedc8-7f2d-43c2-a95b-6fcd25b4a638",
      "name": "Split reference images",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        512,
        1056
      ]
    },
    {
      "id": "7c1bcb47-53f9-49f7-b113-e47fd343f257",
      "name": "Get reference image",
      "type": "n8n-nodes-base.airtable",
      "position": [
        720,
        1056
      ]
    },
    {
      "id": "84a1f3a1-f07c-4b96-8230-8f6ac5b3aa09",
      "name": "Edit reference image",
      "type": "n8n-nodes-base.set",
      "position": [
        928,
        1056
      ]
    },
    {
      "id": "aa125477-4571-4f0e-8048-ede5399e1dc8",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1344,
        1056
      ]
    },
    {
      "id": "aea3c143-19d0-4e78-ac42-77169a9aee23",
      "name": "Merge templates data",
      "type": "n8n-nodes-base.merge",
      "position": [
        544,
        896
      ]
    },
    {
      "id": "57503692-1718-4a0b-9571-876157d03c7d",
      "name": "All combinations",
      "type": "n8n-nodes-base.merge",
      "position": [
        832,
        320
      ]
    },
    {
      "id": "21a21132-0aa5-4c93-988e-5619bdaf283a",
      "name": "Download product image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        368,
        512
      ]
    },
    {
      "id": "85fb61ce-6ad2-4459-b7fa-8d364e1b20de",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        304
      ]
    },
    {
      "id": "d39bb48d-cc1f-4a25-90b8-8954a25cbbe7",
      "name": "Generate with 1 ref",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        128
      ]
    },
    {
      "id": "5e05fb1a-349a-47db-ba61-5eda06ad21a4",
      "name": "Generate with 2 refs",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        320
      ]
    },
    {
      "id": "e2e5fa21-2410-4d2b-b5fb-0098aaefcfe8",
      "name": "Generate with 3 refs",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        512
      ]
    },
    {
      "id": "cd75753a-af60-4cfa-8df4-20e66024dfe7",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1600,
        304
      ]
    },
    {
      "id": "535911c6-7163-4492-bb65-a6784e10f02f",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1872,
        320
      ]
    },
    {
      "id": "8d0504da-1d78-4162-b661-7fb8af37e8e5",
      "name": "parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -48
      ]
    },
    {
      "id": "1f4e2221-0180-4e9c-939b-3ca229dda498",
      "name": "Update job status",
      "type": "n8n-nodes-base.airtable",
      "position": [
        192,
        -208
      ]
    },
    {
      "id": "2795c78d-39e0-453e-8013-103c792122ff",
      "name": "Update job status (done)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2704,
        320
      ]
    },
    {
      "id": "e6711f0b-f985-46a9-9adf-0408ec0c062d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        176
      ],
      "parameters": {
        "width": 1072,
        "height": 336,
        "content": "## Step 4. Create new Result records in Airtable\n- For each generated image, create new Result record\n- Upload generated image and attach it to its Result record via HTTP node\n- Set Job's status to 'd"
      }
    },
    {
      "id": "566017ed-7968-4ba5-b930-88e6c542a5b4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        0
      ],
      "parameters": {
        "width": 960,
        "height": 672,
        "content": "## Step 3. Generate new product images\n- Create all combinations of original images and templates\n- Pick generation node based on the number of reference images (up to 3)\n- Generate new product images"
      }
    },
    {
      "id": "0a3f8a80-d670-41ec-af49-cd8d5711cd3f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        768
      ],
      "parameters": {
        "width": 1856,
        "height": 496,
        "content": "## Step 2b. Get templates with reference images\n- Fetch Template records specified in Job (each template contains a **prompt** and one or several **reference images**)\n- For each template, download re"
      }
    },
    {
      "id": "73da7bc0-d36a-4c69-96bd-116876e1025b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        400
      ],
      "parameters": {
        "width": 816,
        "height": 288,
        "content": "## Step 2a. Get original product image\n- Fetch Product records specified in Job\n- Download product images"
      }
    },
    {
      "id": "f324e87b-1821-4c92-8c67-3276fa79fcb4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -192
      ],
      "parameters": {
        "width": 224,
        "height": 304,
        "content": "## Configure\n➤ set Airtable base ID\n➤ set Airtable field ID for generated images"
      }
    },
    {
      "id": "4b0b80c7-8f71-4032-83bb-3df0042e449b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -320
      ],
      "parameters": {
        "width": 528,
        "height": 432,
        "content": "## Step 1. Fetch Job record by ID\nAlso set Job's status to 'in progress' in Airtable"
      }
    },
    {
      "id": "c4c76af6-3023-40cd-b27f-d4a144edff6b",
      "name": "Upload attachment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2496,
        320
      ]
    },
    {
      "id": "fb2d292d-f389-4761-8fac-8a02bd81366f",
      "name": "Create Result record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2288,
        320
      ]
    },
    {
      "id": "7b9cf6ec-84ae-45b4-9b7d-ea46fdf2c48e",
      "name": "Collect variables",
      "type": "n8n-nodes-base.set",
      "position": [
        2080,
        320
      ]
    },
    {
      "id": "3d346e31-2372-4261-b596-291c71b2f629",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        208
      ],
      "parameters": {
        "width": 768,
        "height": 752,
        "content": "## AI Product Photography using Airtable and Gemini (Nano Banana)\n\nThis workflow automates the process of generating stylized product photos for e-commerce by combining real product shots with creativ"
      }
    },
    {
      "id": "bacc0136-0fcf-4f69-8417-d9ba848085ef",
      "name": "Download reference image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        1056
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Generate with 1 ref",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate with 2 refs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate with 3 refs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Job": {
      "main": [
        [
          {
            "node": "Update job status",
            "type": "main",
            "index": 0
          },
          {
            "node": "Clean up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean up": {
      "main": [
        [
          {
            "node": "Split products",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split templates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Loop over templates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "parameters": {
      "main": [
        [
          {
            "node": "Get Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get products": {
      "main": [
        [
          {
            "node": "Edit products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit products": {
      "main": [
        [
          {
            "node": "Download product image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get templates": {
      "main": [
        [
          {
            "node": "Edit templates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit templates": {
      "main": [
        [
          {
            "node": "Loop over templates",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge templates data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split products": {
      "main": [
        [
          {
            "node": "Get products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split templates": {
      "main": [
        [
          {
            "node": "Get templates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "All combinations": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect variables": {
      "main": [
        [
          {
            "node": "Create Result record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Collect variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update job status": {
      "main": [
        []
      ]
    },
    "Upload attachment": {
      "main": [
        [
          {
            "node": "Update job status (done)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate with 1 ref": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get reference image": {
      "main": [
        [
          {
            "node": "Edit reference image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over templates": {
      "main": [
        [
          {
            "node": "Merge templates data",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Split reference images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Result record": {
      "main": [
        [
          {
            "node": "Upload attachment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit reference image": {
      "main": [
        [
          {
            "node": "Download reference image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate with 2 refs": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generate with 3 refs": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Merge templates data": {
      "main": [
        [
          {
            "node": "All combinations",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Download product image": {
      "main": [
        [
          {
            "node": "All combinations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split reference images": {
      "main": [
        [
          {
            "node": "Get reference image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download reference image": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update job status (done)": {
      "main": [
        []
      ]
    }
  }
}