{
  "name": "Generate and schedule social media posts with OpenAI, Google Sheets and Buffer",
  "nodes": [
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000001",
      "name": "Daily 6AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        256,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000002",
      "name": "Get Pending Content",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000003",
      "name": "Validate Required Fields",
      "type": "n8n-nodes-base.if",
      "position": [
        752,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000004",
      "name": "No Pending Content",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1008,
        560
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000005",
      "name": "Process Each Item",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1008,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000006",
      "name": "Generate LinkedIn Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1264,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000007",
      "name": "Generate Twitter Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1504,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000008",
      "name": "Generate Facebook Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1760,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000009",
      "name": "Collect All Platform Posts",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000010",
      "name": "Update Sheet - Content Generated",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2256,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000011",
      "name": "Schedule LinkedIn to Buffer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2512,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000012",
      "name": "Schedule Twitter to Buffer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2752,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000013",
      "name": "Schedule Facebook to Buffer",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3008,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000014",
      "name": "Update Sheet - Scheduled",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3264,
        304
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000015",
      "name": "Send Success Summary",
      "type": "n8n-nodes-base.slack",
      "position": [
        1264,
        560
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000016",
      "name": "On Workflow Error",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        256,
        800
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000017",
      "name": "Prepare Error Data",
      "type": "n8n-nodes-base.set",
      "position": [
        512,
        800
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000018",
      "name": "Update Sheet - Failed",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        752,
        800
      ]
    },
    {
      "id": "a1b2c3d4-0001-4000-8000-000000000019",
      "name": "Send Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1008,
        800
      ]
    },
    {
      "id": "b0000000-0000-4000-8000-000000000001",
      "name": "Note - Main",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -496
      ],
      "parameters": {
        "width": 550,
        "height": 580,
        "content": "## How it works\nThis workflow runs daily at 6 AM UTC. It reads all rows with status \"pending\" from your Google Sheet, validates that required fields are present (content ID, topic, key points, schedul"
      }
    },
    {
      "id": "b0000000-0000-4000-8000-000000000002",
      "name": "Note - Trigger section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        208
      ],
      "parameters": {
        "width": 460,
        "height": 80,
        "content": "**Trigger & fetch**\nDaily schedule + Google Sheets read"
      }
    },
    {
      "id": "b0000000-0000-4000-8000-000000000003",
      "name": "Note - Validation section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        208
      ],
      "parameters": {
        "width": 270,
        "height": 80,
        "content": "**Validation**\nCheck required fields before processing"
      }
    },
    {
      "id": "b0000000-0000-4000-8000-000000000004",
      "name": "Note - AI generation section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        208
      ],
      "parameters": {
        "width": 780,
        "height": 80,
        "content": "**AI content generation**\nSequential: LinkedIn > Twitter > Facebook"
      }
    },
    {
      "id": "b0000000-0000-4000-8000-000000000005",
      "name": "Note - Buffer scheduling section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2224,
        208
      ],
      "parameters": {
        "width": 780,
        "height": 80,
        "content": "**Scheduling & status**\nBuffer API calls + Google Sheets updates"
      }
    },
    {
      "id": "b0000000-0000-4000-8000-000000000006",
      "name": "Note - Error handling section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        704
      ],
      "parameters": {
        "width": 780,
        "height": 80,
        "content": "**Error handling**\nLog failures to sheet + Slack alert"
      }
    }
  ],
  "connections": {
    "Daily 6AM Trigger": {
      "main": [
        [
          {
            "node": "Get Pending Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Workflow Error": {
      "main": [
        [
          {
            "node": "Prepare Error Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Item": {
      "main": [
        [
          {
            "node": "Generate LinkedIn Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Success Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Error Data": {
      "main": [
        [
          {
            "node": "Update Sheet - Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Pending Content": {
      "main": [
        [
          {
            "node": "Validate Required Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Twitter Post": {
      "main": [
        [
          {
            "node": "Generate Facebook Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet - Failed": {
      "main": [
        [
          {
            "node": "Send Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Facebook Post": {
      "main": [
        [
          {
            "node": "Collect All Platform Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate LinkedIn Post": {
      "main": [
        [
          {
            "node": "Generate Twitter Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet - Scheduled": {
      "main": [
        [
          {
            "node": "Process Each Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Required Fields": {
      "main": [
        [
          {
            "node": "Process Each Item",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Pending Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect All Platform Posts": {
      "main": [
        [
          {
            "node": "Update Sheet - Content Generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Twitter to Buffer": {
      "main": [
        [
          {
            "node": "Schedule Facebook to Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Facebook to Buffer": {
      "main": [
        [
          {
            "node": "Update Sheet - Scheduled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule LinkedIn to Buffer": {
      "main": [
        [
          {
            "node": "Schedule Twitter to Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet - Content Generated": {
      "main": [
        [
          {
            "node": "Schedule LinkedIn to Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}