{
  "name": "Automated generation of AI advertising photos for product marketing",
  "nodes": [
    {
      "id": "68c2216d-7393-4d64-a6e4-7b5e384389a4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        420,
        1020
      ]
    },
    {
      "id": "849df02a-cd4c-4c1a-80c9-84852eccd7d7",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        840,
        500
      ]
    },
    {
      "id": "b1fe6bd4-f20b-4e13-83ce-58aa80372fe5",
      "name": "Read Image URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -300,
        480
      ]
    },
    {
      "id": "3c69465c-e3c7-4536-80ae-70f2bac53414",
      "name": "Download Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -100,
        480
      ]
    },
    {
      "id": "8f099961-42bd-43c2-8258-64e12a2b9f4b",
      "name": "Analyze Images",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        260,
        820
      ]
    },
    {
      "id": "9ec41380-5297-4786-8216-140255285edb",
      "name": "Product Photography Prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        460,
        820
      ]
    },
    {
      "id": "e5fbd22f-4081-4f51-9906-4b0f2d58fa81",
      "name": "Send Image with Prompt to OpenAI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        500
      ]
    },
    {
      "id": "4812c3d5-d5eb-4ee0-97cb-786d2a3a9da5",
      "name": "Convert Base64 to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1300,
        500
      ]
    },
    {
      "id": "b6cb024c-1f67-4df2-8bb1-1a3740212b4d",
      "name": "Upload to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1600,
        500
      ]
    },
    {
      "id": "7e855dc6-0a1b-44f3-83b8-64d76693de87",
      "name": "Insert Image URL in Table",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1820,
        500
      ]
    },
    {
      "id": "611b6d08-5a55-4085-840a-53a1b4eb24ed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        380
      ],
      "parameters": {
        "width": 600,
        "height": 360,
        "content": "## Extract Product Images from Template"
      }
    },
    {
      "id": "e27aa751-41d4-40a9-a72c-90e327388257",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        720
      ],
      "parameters": {
        "width": 600,
        "height": 360,
        "content": "## Analyze Images and Create Prompt for Product Photography"
      }
    },
    {
      "id": "ea5e9556-0485-4be9-a35f-32be69ed2de0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        380
      ],
      "parameters": {
        "width": 460,
        "height": 360,
        "content": "## gpt-image-1 creates the Product Photography"
      }
    },
    {
      "id": "9869ab24-02db-4b88-8429-b0f7f5a5bf2d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        380
      ],
      "parameters": {
        "width": 520,
        "height": 360,
        "content": "## Output is uploaded to Drive and the Image URLs are saved in the table"
      }
    },
    {
      "id": "05c2e7af-6e3e-4171-ac28-444bec1eef49",
      "name": "When clicking 'Test workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -500,
        480
      ]
    },
    {
      "id": "88c861e1-6b7c-4597-899a-e0f13ad7994a",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -80,
        -120
      ]
    },
    {
      "id": "0edb4268-9e9e-41a9-9e6e-9bed3a73f0d9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -220
      ],
      "parameters": {
        "width": 660,
        "height": 260,
        "content": "## Simple Image Generation\n### Don't forget the manual trigger ;)"
      }
    },
    {
      "id": "81b1385a-4a94-475c-9ee8-31dd5efb8dc7",
      "name": "Generate Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -260,
        -120
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Send Image with Prompt to OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Images": {
      "main": [
        [
          {
            "node": "Product Photography Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Images": {
      "main": [
        [
          {
            "node": "Analyze Images",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Image URLs": {
      "main": [
        [
          {
            "node": "Download Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Drive": {
      "main": [
        [
          {
            "node": "Insert Image URL in Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Product Photography Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert Base64 to File": {
      "main": [
        [
          {
            "node": "Upload to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Product Photography Prompt": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking 'Test workflow'": {
      "main": [
        [
          {
            "node": "Read Image URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Image with Prompt to OpenAI": {
      "main": [
        [
          {
            "node": "Convert Base64 to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}