{
  "name": "Create and post social media image captions with GPT-4.1-mini and Google Sheets",
  "nodes": [
    {
      "id": "86897bee-d217-46ec-8dbd-81ff6c8828d4",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        32,
        -192
      ]
    },
    {
      "id": "1d3cd9a6-1f6d-4289-abc4-a90790690282",
      "name": "get sheet data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -192,
        -192
      ]
    },
    {
      "id": "446f2ec1-a8ed-45f1-aa08-d38c133f782e",
      "name": "Create Tweet",
      "type": "n8n-nodes-base.twitter",
      "position": [
        928,
        -288
      ]
    },
    {
      "id": "800ab82f-b5f0-406f-9606-fb49b62d9fbe",
      "name": "Instagram IMG",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        480,
        -480
      ]
    },
    {
      "id": "1cae7c78-7708-42eb-a80c-728abceaf139",
      "name": "Instagram Post",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        928,
        -480
      ]
    },
    {
      "id": "e1531fdd-0671-44d0-a59c-04b85c23a9f0",
      "name": "Update Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1152,
        -192
      ]
    },
    {
      "id": "51edf78a-0bf0-4b57-b327-cc3cc92c2c27",
      "name": "Get Media",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        96
      ]
    },
    {
      "id": "2fcb911d-fc10-4c47-ba7a-5fc83f91bf8f",
      "name": "Linkedin Post",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        928,
        96
      ]
    },
    {
      "id": "993e75ee-37c6-4af9-b7a0-affc956e53e5",
      "name": "Route",
      "type": "n8n-nodes-base.switch",
      "position": [
        256,
        -224
      ]
    },
    {
      "id": "95a11a65-61eb-4df8-baba-70d0daa1128a",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        704,
        -480
      ]
    },
    {
      "id": "34919763-3bc4-4d1a-8d6b-c38baadad6fd",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -256,
        -848
      ]
    },
    {
      "id": "d4add22a-e3ff-4145-b68d-2b43f013200b",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        800,
        -848
      ]
    },
    {
      "id": "82fd0d12-0d95-4586-a684-a6665e5274b4",
      "name": "Post Topic",
      "type": "n8n-nodes-base.set",
      "position": [
        112,
        -848
      ]
    },
    {
      "id": "85876f65-5cf4-4151-a830-8efd5e1021b0",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2048,
        -1264
      ],
      "parameters": {
        "width": 460,
        "height": 252,
        "content": "## 👨‍💻 Creator Information\n\n**Created by:** Samyotech  \n🔗 **LinkedIn:** [Connect with me](https://www.linkedin.com/company/samyotech/posts/?feedView=all)\n🔗 **Youtube:** [Subscribe to my Channel](https"
      }
    },
    {
      "id": "1fe5e59e-757f-4cef-86aa-18af3c91fc0c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -944
      ],
      "parameters": {
        "width": 448,
        "height": 240,
        "content": "Click to run workflow – Trigger the workflow manually\n- Set topic in the Set node \n- LLM generates caption\n- Store in the sheet"
      }
    },
    {
      "id": "7b0e330f-130f-4aa0-885a-22474dde5087",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -944
      ],
      "parameters": {
        "width": 320,
        "height": 240,
        "content": "Review the generated caption in the sheet, update its status to ‘Approved’, and select the platform(s) where you want to post."
      }
    },
    {
      "id": "31443a99-f29d-4e72-93a4-a6fda758c74c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        -944
      ],
      "parameters": {
        "width": 256,
        "height": 240,
        "content": "Update the title with the topic you want to post and add the image URL in the Set node."
      }
    },
    {
      "id": "4c5c3671-39ae-46de-91a6-ae8636ba934b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -272
      ],
      "parameters": {
        "width": 368,
        "height": 240,
        "content": "Once reviewed, update the status to ‘Approved’ in the sheet. Then the workflow will run and post on the respective platform(s) you selected."
      }
    },
    {
      "id": "a3abb341-687b-490c-a332-7d8766fa9334",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -1264
      ],
      "parameters": {
        "width": 720,
        "height": 496,
        "content": "# Social media posting automation with images and captions\n\n## How it works\nThis workflow automates the creation and publishing of social media posts. An AI model generates captions based on a provide"
      }
    },
    {
      "id": "39bb6395-f058-4ba5-94f3-2d68bbbb76f6",
      "name": "Schedule social media posts",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -416,
        -192
      ]
    },
    {
      "id": "e1e4a603-3628-403f-a59f-c77d368b6719",
      "name": "Generate Caption",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        368,
        -848
      ]
    },
    {
      "id": "42b000f5-444b-40f4-86bd-2121b2a9fcd8",
      "name": "Get Media2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        -288
      ]
    },
    {
      "id": "f7d79242-a34e-4720-9946-bad6edac9160",
      "name": "Facebook Post",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        928,
        -96
      ]
    },
    {
      "id": "443d39e7-a6b4-4957-86e1-feb28cc59cb1",
      "name": "Post Facebook Img",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        -96
      ]
    },
    {
      "id": "eb157cd5-deab-4d5f-8f4b-3cf720099719",
      "name": "Post  X Img",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        704,
        -288
      ]
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Instagram Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route": {
      "main": [
        [
          {
            "node": "Instagram IMG",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Media2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post Facebook Img",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Media": {
      "main": [
        [
          {
            "node": "Linkedin Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Media2": {
      "main": [
        [
          {
            "node": "Post  X Img",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Topic": {
      "main": [
        [
          {
            "node": "Generate Caption",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post  X Img": {
      "main": [
        [
          {
            "node": "Create Tweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Tweet": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook Post": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram IMG": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Linkedin Post": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram Post": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get sheet data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Route",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Caption": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Facebook Img": {
      "main": [
        [
          {
            "node": "Facebook Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule social media posts": {
      "main": [
        [
          {
            "node": "get sheet data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Post Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}