{
  "name": "AI-generated LinkedIn posts with OpenAI, Google Sheets & email approval workflow",
  "nodes": [
    {
      "id": "d0f86395-aeec-4284-a2d5-26db2dfebd53",
      "name": "Get Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1592,
        2120
      ]
    },
    {
      "id": "b8ca88a6-aaf1-4191-8b75-9a63b746af77",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -260,
        2595
      ]
    },
    {
      "id": "8e4e294f-56d4-4317-aea8-ea258527f55a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        268,
        2815
      ]
    },
    {
      "id": "d262684e-7671-4602-ba77-4270441a69fb",
      "name": "Get Data from Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -40,
        2595
      ]
    },
    {
      "id": "93d3e57f-a22d-4c04-9ccc-7ee655bedbdb",
      "name": "Generate Post Content",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        180,
        2595
      ]
    },
    {
      "id": "6ea121f4-661c-4dd4-a0bc-7edb8a0b884a",
      "name": "Data Formatting 1",
      "type": "n8n-nodes-base.set",
      "position": [
        556,
        2595
      ]
    },
    {
      "id": "a00ec081-07c0-4f8a-9139-6606a65236ff",
      "name": "Send Content Confirmation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        776,
        2495
      ]
    },
    {
      "id": "5a1e8061-ef79-4974-888d-8670e60a1b0c",
      "name": "Content Confirmation Logic",
      "type": "n8n-nodes-base.switch",
      "position": [
        996,
        2495
      ]
    },
    {
      "id": "c139fda0-4be1-4ad7-bb28-802b7150365d",
      "name": "Regenerate Post Content",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1216,
        2670
      ]
    },
    {
      "id": "b8587578-03a6-4975-8907-667628dc958a",
      "name": "If Image Provided",
      "type": "n8n-nodes-base.if",
      "position": [
        1294,
        2220
      ]
    },
    {
      "id": "30bf76c8-8420-4d77-bc2b-8a1c27fbf36a",
      "name": "Post With Image",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1812,
        2120
      ]
    },
    {
      "id": "62bf9597-3e38-45ec-853c-aa2d77c40bc2",
      "name": "Post Without Image",
      "type": "n8n-nodes-base.linkedIn",
      "position": [
        1812,
        2320
      ]
    },
    {
      "id": "0ddd307d-5e54-42cf-b65a-25f111fb4bea",
      "name": "Update Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2032,
        2320
      ]
    },
    {
      "id": "c4a55beb-8459-4faa-b072-51c500562ae3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        2480
      ],
      "parameters": {
        "width": 420,
        "height": 380,
        "content": "## 1. Schedule & Sheet Data Retrieval\n\nThis workflow starts automatically on a defined schedule (e.g., daily or hourly).\n\nIt retrieves the next Google Sheet row marked as ‘Pending’.\n\nThe sheet should "
      }
    },
    {
      "id": "09dade5b-e26a-4b97-9b8a-a5c807cff937",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        3040
      ],
      "parameters": {
        "width": 420,
        "height": 240,
        "content": "## 2. AI-Powered Post Generation & Formatting\n\nUses OpenAI GPT to generate a LinkedIn post based on the sheet’s Post Description and Instructions.\n\nYou can modify the prompt if needed.\nThe generated p"
      }
    },
    {
      "id": "f373dfd9-f971-4925-8e74-15201c8a47c4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        3040
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "## 3. Gmail Approval Workflow\n\nSends the formatted post to an approver via Gmail.\n\nThe approver can respond with:\n✅ Yes – Approve\n✏️ No – Request changes\n❌ Cancel – Abort the post\n\nSet Gmail credentia"
      }
    },
    {
      "id": "66d51a35-262e-469b-bcd8-aca3cf60452c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        3040
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "## 4. Approval Handling & Regeneration\n\nHandles all approval responses:\n- If Yes, proceed to post.\n- If No, regenerate content based on the feedback and resend.\n- If Cancel, update the Google Sheet as"
      }
    },
    {
      "id": "ad4023af-0e8b-4ec1-be1d-9313ec4f5ca7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1800,
        3040
      ],
      "parameters": {
        "width": 460,
        "height": 320,
        "content": "## 5. Image Check, Posting & Sheet Update\n\nChecks if an image URL is provided.\n- If present: Downloads the image and posts with it.\n- If not: Posts content without an image.\n\nAfter posting, it updates"
      }
    }
  ],
  "connections": {
    "Get Image": {
      "main": [
        [
          {
            "node": "Post With Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post With Image": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Data from Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Formatting 1": {
      "main": [
        [
          {
            "node": "Send Content Confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Image Provided": {
      "main": [
        [
          {
            "node": "Get Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post Without Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Post Content",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Regenerate Post Content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Post Without Image": {
      "main": [
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Data from Sheets": {
      "main": [
        [
          {
            "node": "Generate Post Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Post Content": {
      "main": [
        [
          {
            "node": "Data Formatting 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Regenerate Post Content": {
      "main": [
        [
          {
            "node": "Data Formatting 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Content Confirmation": {
      "main": [
        [
          {
            "node": "Content Confirmation Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Confirmation Logic": {
      "main": [
        [
          {
            "node": "If Image Provided",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Regenerate Post Content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}