AutomationFlowsAI & RAG › Create Stylized Product Photography with Airtable & Gemini Nano Banana

Create Stylized Product Photography with Airtable & Gemini Nano Banana

ByVadim @coderik on n8n.io

This workflow automates the process of generating stylized product photos for e-commerce by combining real product shots with creative templates. It enables the creation of a complete set of images for an SKU from a single product photo and a set of reusable templates. The…

Webhook trigger★★★★★ complexityAI-powered37 nodesAirtableHTTP RequestGoogle Gemini
AI & RAG Trigger: Webhook Nodes: 37 Complexity: ★★★★★ AI nodes: yes Added:
Create Stylized Product Photography with Airtable & Gemini Nano Banana — n8n workflow card showing Airtable, HTTP Request, Google Gemini integration

This workflow corresponds to n8n.io template #10250 — we link there as the canonical source.

This workflow follows the Airtable → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "6PKg5iRas6OJzsXR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Product photography - review",
  "tags": [],
  "nodes": [
    {
      "id": "9d581fc1-2b21-41f2-b61f-e1b2984eba34",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -544,
        -48
      ],
      "parameters": {
        "path": "736029f4-2d85-409f-8841-1ca9a010e385",
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "0cf73e67-9194-4fb8-af9c-05604e337d40",
      "name": "Get Job",
      "type": "n8n-nodes-base.airtable",
      "position": [
        0,
        -48
      ],
      "parameters": {
        "id": "={{ $('Webhook').item.json.query.recordId }}",
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblN7ikAWki5s5jcd",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblN7ikAWki5s5jcd",
          "cachedResultName": "Jobs"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0a022036-95d0-4409-8a61-60afe3c767eb",
      "name": "Clean up",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a3ccbf23-1cbe-4c72-a98f-2739d9ff86bb",
              "name": "products",
              "type": "array",
              "value": "={{ $json[\"Product Images\"] }}"
            },
            {
              "id": "393ff00d-6976-4e2f-894a-e8faac20df59",
              "name": "templates",
              "type": "array",
              "value": "={{ $json.Templates }}"
            },
            {
              "id": "531d603d-168e-484d-9543-a002d57b64f6",
              "name": "job_id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1e5d84ca-72c4-462f-b5a8-68861652eb65",
      "name": "Split products",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -256,
        512
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "products"
      },
      "typeVersion": 1
    },
    {
      "id": "0c3dfd3a-0871-4a7b-9252-6070289d8a9e",
      "name": "Get products",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -48,
        512
      ],
      "parameters": {
        "id": "={{ $json.products }}",
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblZeNi5MVPOEj7Hp",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblZeNi5MVPOEj7Hp",
          "cachedResultName": "Product Images"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a3487dd1-d051-447e-8f38-dd4150ad4a9e",
      "name": "Split templates",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -304,
        880
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "templates"
      },
      "typeVersion": 1
    },
    {
      "id": "bbfb9c8b-7356-4dcf-b028-9d9b320b4a76",
      "name": "Get templates",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -96,
        880
      ],
      "parameters": {
        "id": "={{ $json.templates }}",
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblGJpUnqFpLMlVFe",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblGJpUnqFpLMlVFe",
          "cachedResultName": "Templates"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a161d2a7-1487-4676-9a01-b34a9d5de3f3",
      "name": "Edit products",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        512
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "01aa86b1-9db5-4e37-85b3-bc9310086a34",
              "name": "product_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "1683c450-7ce9-4f4d-bbe7-aa3adec0268e",
              "name": "product_image_url",
              "type": "string",
              "value": "={{ $json.Image[0].url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0c2ea55a-6403-4cc6-9d5b-cc0923a0c700",
      "name": "Edit templates",
      "type": "n8n-nodes-base.set",
      "position": [
        112,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "30c708da-5ecd-47f5-8464-491c2fe57dac",
              "name": "template_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "00dad2c3-d89f-4cb2-b6a1-0b5c2a059ed3",
              "name": "prompt",
              "type": "string",
              "value": "={{ $json[\"Text Prompt\"] }}"
            },
            {
              "id": "066fe522-da75-479e-891a-83bc7382bd04",
              "name": "reference_images",
              "type": "array",
              "value": "={{ $json[\"Reference Images\"] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0be8b4ac-5135-49bf-902f-898ea1fc292f",
      "name": "Loop over templates",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        320,
        1056
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "f0ccedc8-7f2d-43c2-a95b-6fcd25b4a638",
      "name": "Split reference images",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        512,
        1056
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "reference_images"
      },
      "typeVersion": 1
    },
    {
      "id": "7c1bcb47-53f9-49f7-b113-e47fd343f257",
      "name": "Get reference image",
      "type": "n8n-nodes-base.airtable",
      "position": [
        720,
        1056
      ],
      "parameters": {
        "id": "={{ $json.reference_images }}",
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl4STKAfNWhTsJjl",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tbl4STKAfNWhTsJjl",
          "cachedResultName": "Reference Images"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "84a1f3a1-f07c-4b96-8230-8f6ac5b3aa09",
      "name": "Edit reference image",
      "type": "n8n-nodes-base.set",
      "position": [
        928,
        1056
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "04e74aef-d137-46e3-b3dc-8c7df312a082",
              "name": "image_id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "9a1d608a-6899-4e8f-a176-49aecee80071",
              "name": "image_url",
              "type": "string",
              "value": "={{ $json.Image[0].url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "aa125477-4571-4f0e-8048-ede5399e1dc8",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1344,
        1056
      ],
      "parameters": {
        "options": {
          "includeBinaries": true
        },
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "reference_images"
      },
      "typeVersion": 1
    },
    {
      "id": "aea3c143-19d0-4e78-ac42-77169a9aee23",
      "name": "Merge templates data",
      "type": "n8n-nodes-base.merge",
      "position": [
        544,
        896
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "57503692-1718-4a0b-9571-876157d03c7d",
      "name": "All combinations",
      "type": "n8n-nodes-base.merge",
      "position": [
        832,
        320
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "21a21132-0aa5-4c93-988e-5619bdaf283a",
      "name": "Download product image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        368,
        512
      ],
      "parameters": {
        "url": "={{ $json.product_image_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "product_data"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "85fb61ce-6ad2-4459-b7fa-8d364e1b20de",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1040,
        304
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "1",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "8211d8e0-11b2-418c-9841-4895024a6b68",
                    "operator": {
                      "type": "array",
                      "operation": "lengthEquals",
                      "rightType": "number"
                    },
                    "leftValue": "={{ $json.reference_images }}",
                    "rightValue": 1
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "2",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "398d3cf3-4956-47fa-bee6-57d9a7918cfd",
                    "operator": {
                      "type": "array",
                      "operation": "lengthEquals",
                      "rightType": "number"
                    },
                    "leftValue": "={{ $json.reference_images }}",
                    "rightValue": 2
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "3",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "f60c5fb0-725d-4978-b0ce-bb5ca877cff8",
                    "operator": {
                      "type": "array",
                      "operation": "lengthGte",
                      "rightType": "number"
                    },
                    "leftValue": "={{ $json.reference_images }}",
                    "rightValue": 3
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "d39bb48d-cc1f-4a25-90b8-8954a25cbbe7",
      "name": "Generate with 1 ref",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        128
      ],
      "parameters": {
        "images": {
          "values": [
            {
              "binaryPropertyName": "product_data"
            },
            {}
          ]
        },
        "prompt": "={{ $json.prompt }}",
        "options": {
          "binaryPropertyOutput": "edited"
        },
        "resource": "image",
        "operation": "edit"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5e05fb1a-349a-47db-ba61-5eda06ad21a4",
      "name": "Generate with 2 refs",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        320
      ],
      "parameters": {
        "images": {
          "values": [
            {
              "binaryPropertyName": "product_data"
            },
            {},
            {
              "binaryPropertyName": "data_1"
            }
          ]
        },
        "prompt": "={{ $json.prompt }}",
        "options": {
          "binaryPropertyOutput": "edited"
        },
        "resource": "image",
        "operation": "edit"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e2e5fa21-2410-4d2b-b5fb-0098aaefcfe8",
      "name": "Generate with 3 refs",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        1328,
        512
      ],
      "parameters": {
        "images": {
          "values": [
            {
              "binaryPropertyName": "product_data"
            },
            {},
            {
              "binaryPropertyName": "data_1"
            },
            {
              "binaryPropertyName": "data_2"
            }
          ]
        },
        "prompt": "={{ $json.prompt }}",
        "options": {
          "binaryPropertyOutput": "edited"
        },
        "resource": "image",
        "operation": "edit"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cd75753a-af60-4cfa-8df4-20e66024dfe7",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1600,
        304
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "535911c6-7163-4492-bb65-a6784e10f02f",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1872,
        320
      ],
      "parameters": {
        "options": {
          "encoding": "utf8",
          "keepSource": "json"
        },
        "operation": "binaryToPropery",
        "destinationKey": "output_base64",
        "binaryPropertyName": "edited"
      },
      "typeVersion": 1
    },
    {
      "id": "8d0504da-1d78-4162-b661-7fb8af37e8e5",
      "name": "parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c7691548-c717-4a29-b983-5a394f2a7ad2",
              "name": "airtableBaseId",
              "type": "string",
              "value": "app3umoCF1t88Mg0q"
            },
            {
              "id": "4282bb3a-8ab7-4742-99bd-2a3343bfe62c",
              "name": "airtableResultImageFieldId",
              "type": "string",
              "value": "fldzhCsleyyBrPyKj"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1f4e2221-0180-4e9c-939b-3ca229dda498",
      "name": "Update job status",
      "type": "n8n-nodes-base.airtable",
      "position": [
        192,
        -208
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblN7ikAWki5s5jcd",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblN7ikAWki5s5jcd",
          "cachedResultName": "Jobs"
        },
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "Status": "In progress"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Images",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product Images",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Templates",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Templates",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Created Time",
              "type": "dateTime",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Created Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Created",
                  "value": "Created"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Results",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Results",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Generate",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Generate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2795c78d-39e0-453e-8013-103c792122ff",
      "name": "Update job status (done)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2704,
        320
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblN7ikAWki5s5jcd",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblN7ikAWki5s5jcd",
          "cachedResultName": "Jobs"
        },
        "columns": {
          "value": {
            "id": "={{ $('Get Job').item.json.id }}",
            "Status": "Done"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Images",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product Images",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Templates",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Templates",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Created Time",
              "type": "dateTime",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Created Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Created",
                  "value": "Created"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Results",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Results",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Generate",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Generate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e6711f0b-f985-46a9-9adf-0408ec0c062d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        176
      ],
      "parameters": {
        "color": 6,
        "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 'done' "
      },
      "typeVersion": 1
    },
    {
      "id": "566017ed-7968-4ba5-b930-88e6c542a5b4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        0
      ],
      "parameters": {
        "color": 6,
        "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"
      },
      "typeVersion": 1
    },
    {
      "id": "0a3f8a80-d670-41ec-af49-cd8d5711cd3f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        768
      ],
      "parameters": {
        "color": 6,
        "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 reference images (in the loop)"
      },
      "typeVersion": 1
    },
    {
      "id": "73da7bc0-d36a-4c69-96bd-116876e1025b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        400
      ],
      "parameters": {
        "color": 6,
        "width": 816,
        "height": 288,
        "content": "## Step 2a. Get original product image\n- Fetch Product records specified in Job\n- Download product images"
      },
      "typeVersion": 1
    },
    {
      "id": "f324e87b-1821-4c92-8c67-3276fa79fcb4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -352,
        -192
      ],
      "parameters": {
        "color": 5,
        "width": 224,
        "height": 304,
        "content": "## Configure\n\u27a4 set Airtable base ID\n\u27a4 set Airtable field ID for generated images"
      },
      "typeVersion": 1
    },
    {
      "id": "4b0b80c7-8f71-4032-83bb-3df0042e449b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -320
      ],
      "parameters": {
        "color": 6,
        "width": 528,
        "height": 432,
        "content": "## Step 1. Fetch Job record by ID\nAlso set Job's status to 'in progress' in Airtable"
      },
      "typeVersion": 1
    },
    {
      "id": "c4c76af6-3023-40cd-b27f-d4a144edff6b",
      "name": "Upload attachment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2496,
        320
      ],
      "parameters": {
        "url": "=https://content.airtable.com/v0/{{ $('parameters').item.json.airtableBaseId }}/{{ $json.id }}/{{ $('parameters').item.json.airtableResultImageFieldId }}/uploadAttachment",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "predefinedCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "contentType",
              "value": "={{ $('Collect variables').item.json.mimeType }}"
            },
            {
              "name": "file",
              "value": "={{ $('Collect variables').item.json.outputBase64 }}"
            },
            {
              "name": "filename",
              "value": "image.png"
            }
          ]
        },
        "nodeCredentialType": "airtableTokenApi"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fb2d292d-f389-4761-8fac-8a02bd81366f",
      "name": "Create Result record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2288,
        320
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('parameters').item.json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblSoB3qTeeKXjsov",
          "cachedResultUrl": "https://airtable.com/app3umoCF1t88Mg0q/tblSoB3qTeeKXjsov",
          "cachedResultName": "Results"
        },
        "columns": {
          "value": {
            "Jobs": "=[\"{{ $json.jobId }}\"]",
            "Status": "Pending",
            "Template": "=[\"{{ $json.templateId }}\"]",
            "Timestamp": "={{ $now }}",
            "Product Image": "=[\"{{ $json.productId }}\"]"
          },
          "schema": [
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Generated Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Generated Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Jobs",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Jobs",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Image",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Product Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Template",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Template",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Timestamp",
              "type": "dateTime",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "Approved",
                  "value": "Approved"
                },
                {
                  "name": "Rejected",
                  "value": "Rejected"
                },
                {
                  "name": "",
                  "value": ""
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Notes",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Notes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7b9cf6ec-84ae-45b4-9b7d-ea46fdf2c48e",
      "name": "Collect variables",
      "type": "n8n-nodes-base.set",
      "position": [
        2080,
        320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3e057dd9-283b-4722-bd2e-23f725f5137f",
              "name": "outputBase64",
              "type": "string",
              "value": "={{ $json.output_base64 }}"
            },
            {
              "id": "b4c377ad-ed0d-42fa-85ca-f08416751595",
              "name": "mimeType",
              "type": "string",
              "value": "={{ $json.mimeType }}"
            },
            {
              "id": "8da67ef3-319b-486e-8f0c-1cd6db274a56",
              "name": "templateId",
              "type": "string",
              "value": "={{ $('All combinations').item.json.template_id }}"
            },
            {
              "id": "3f4967da-e951-4408-9684-ff1c5463d9c3",
              "name": "productId",
              "type": "string",
              "value": "={{ $('All combinations').item.json.product_id }}"
            },
            {
              "id": "990586ac-cd48-4ed6-be37-62472176bfc6",
              "name": "jobId",
              "type": "string",
              "value": "={{ $('Get Job').item.json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "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 creative templates. It enables the creation of a complete set of images for an SKU from a single product photo and a set of reusable templates. The workflow uses Google Gemini (Nano Banana) for image editing and Airtable as the data source.\n\n### Airtable tables\n\nThis workflow expects the following Airtable table setup:\n- **\"Product Images\"** - contains original product photos, one per record.\n- **\"Reference Images\"** - contains reference images for templates, one per record.\n- **\"Templates\"** - contains reusable generation templates. Each template includes a text prompt and up to three reference images.\n- **\"Jobs\"** - contains batch generation jobs. Each job references multiple product images and multiple templates.\n- **\"Results\"** - contains the generated outputs. Each result includes a generated image, references to the job, product image, and template, and a status field (pending, approved, rejected).\n\n\nThe workflow is triggered by a webhook that receives a job ID from Airtable.\n\n### Requirements\n1. Airtable Personal Access Token\n2. Google Gemini API key\n\n### Setup\n1. Ensure all required Airtable tables exist.\n2. Configure parameters in the **parameters** node:\n    - Set Airtable Base ID\n    - Set ID of the attachment field in the \"Results\" table (where the generated images will be uploaded) \n4. Configure credentials for all Airtable nodes.\n5. Set Google Gemini API key for the \"Generate...\" nodes.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "bacc0136-0fcf-4f69-8417-d9ba848085ef",
      "name": "Download reference image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1136,
        1056
      ],
      "parameters": {
        "url": "={{ $json.image_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9d566c64-537d-4b89-bcdf-f6abec5cd490",
  "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": [
        []
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates the process of generating stylized product photos for e-commerce by combining real product shots with creative templates. It enables the creation of a complete set of images for an SKU from a single product photo and a set of reusable templates. The…

Source: https://n8n.io/workflows/10250/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Wpp. Uses googleGemini, httpRequest, airtable. Webhook trigger; 11 nodes.

Google Gemini, HTTP Request, Airtable
AI & RAG

This powerful n8n automation workflow is designed to execute advanced B2B lead enrichment and hyper-personalization for cold email outreach. By orchestrating a complex chain of data scraping, AI analy

OpenAI, HTTP Request, Airtable
AI & RAG

This template is perfect for e-commerce entrepreneurs, marketers, agencies, and creative teams who want to turn simple product photos and short descriptions into professional flyers or product videos—

Airtable, OpenAI, HTTP Request +1
AI & RAG

How it works Runs on schedule (Monday-Friday at 9 AM) to automate lead generation Searches for companies on Google Maps by location and category Extracts owner information from company websites and im

HTTP Request, Anthropic, Google Gemini +3
AI & RAG

This n8n template demonstrates how to capture inbound leads from a form, qualify them with OpenAI, and route the hottest ones to a Bland AI voice agent that calls them back, books a meeting on Google

Airtable, OpenAI, SendGrid +2