{
  "name": "Schedule Facebook posts from Google Sheets with approval and Drive images",
  "nodes": [
    {
      "id": "0a08bdf1-87cf-4fa3-8d5a-a4a24ba3f965",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3120,
        -352
      ],
      "parameters": {
        "width": 432,
        "height": 944,
        "content": "## Facebook Post Scheduler with Approval Workflow\n\nThis workflow automates Facebook post scheduling from a Google\nSheets content calendar. It runs 4 times daily, reads approved\nposts scheduled for tod"
      }
    },
    {
      "id": "223e68a9-67a7-4fd9-affd-ddfba4bae584",
      "name": "Run Daily at Multiple Times",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2656,
        16
      ]
    },
    {
      "id": "9d86b344-9231-4a28-9304-462111414c2a",
      "name": "Load Facebook Credentials from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2416,
        16
      ]
    },
    {
      "id": "4c3cf1a7-d9a0-4fa7-afc3-e8ee67bfa839",
      "name": "Read Approved Facebook Posts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2176,
        16
      ]
    },
    {
      "id": "0513ca6c-0c83-4538-9c2b-0287f35c658d",
      "name": "Filter Posts Scheduled for Today",
      "type": "n8n-nodes-base.code",
      "position": [
        -1920,
        16
      ]
    },
    {
      "id": "89021e3c-e877-4916-8d6b-6fd8187a1344",
      "name": "Loop Through Each Post",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1680,
        16
      ]
    },
    {
      "id": "2da9e213-0fc3-4928-9a94-39ebb3501360",
      "name": "Check if Platform is Facebook",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1424,
        32
      ]
    },
    {
      "id": "e5230dbb-8b74-4fcd-9650-28a798a9a919",
      "name": "Check if Not Story Post",
      "type": "n8n-nodes-base.if",
      "position": [
        -1168,
        32
      ]
    },
    {
      "id": "c8e820dc-a9e1-4cd2-96d8-241cce67934b",
      "name": "Check if Text-Only or Photo Post",
      "type": "n8n-nodes-base.if",
      "position": [
        -912,
        16
      ]
    },
    {
      "id": "f8674e39-ea9f-4b72-872d-9548c42b998d",
      "name": "Download Image from Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -704,
        32
      ]
    },
    {
      "id": "18db8516-03cc-4bc2-bc3d-94cf0ddcc0c2",
      "name": "Schedule Facebook Photo Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        32
      ]
    },
    {
      "id": "7686a72b-9489-4a99-8b78-a85d227a94ec",
      "name": "Update Sheet with Photo Post URL",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -288,
        32
      ]
    },
    {
      "id": "9a6c6d99-40d1-4caa-a4eb-fe989dca6a44",
      "name": "Schedule Facebook Text Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        0
      ]
    },
    {
      "id": "7e19ffae-802a-4b9d-bb6c-a0878f44bd9e",
      "name": "Update Sheet with Text Post URL",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        112,
        0
      ]
    },
    {
      "id": "68a2dafd-1bfc-4abc-acfb-89f38702381f",
      "name": "Merge All Post Types",
      "type": "n8n-nodes-base.merge",
      "position": [
        432,
        16
      ]
    },
    {
      "id": "e434a18c-2ba6-430a-affc-1b18edf8377a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2640,
        -144
      ],
      "parameters": {
        "width": 320,
        "height": 208,
        "content": "## Schedule & Credentials\n\nTriggers 4x daily and loads Facebook\ncredentials from Google Sheets for\nAPI authentication."
      }
    },
    {
      "id": "1af64505-4ca4-4a8a-b03f-821b9be1e38c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2176,
        -144
      ],
      "parameters": {
        "width": 592,
        "height": 208,
        "content": "## Data Loading & Filtering\n\nReads approved Facebook posts from sheet,\nfilters by today's date, and loops through\neach post for processing."
      }
    },
    {
      "id": "35b50cbb-69f5-49cc-a9a8-19b0dd335401",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        -144
      ],
      "parameters": {
        "width": 608,
        "height": 240,
        "content": "## Post Type Routing\n\nChecks platform and post type, then routes\nto appropriate publishing flow (text-only\nvs photo, skips Stories)."
      }
    },
    {
      "id": "08e48517-9758-474e-ba11-40cce53f5988",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        -144
      ],
      "parameters": {
        "width": 512,
        "height": 224,
        "content": "## Photo Post Publishing\n\nDownloads image from Google Drive, schedules\nFacebook photo post via Graph API, updates\nsheet with published photo URL."
      }
    },
    {
      "id": "8e44a18d-5ea9-4223-b71a-a1c49862884d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -144
      ],
      "parameters": {
        "width": 640,
        "height": 224,
        "content": "## Text Post Publishing\n\nSchedules Facebook text-only post via\nGraph API, updates sheet with published\npost URL, merges with other branches."
      }
    }
  ],
  "connections": {
    "Merge All Post Types": {
      "main": [
        [
          {
            "node": "Loop Through Each Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Each Post": {
      "main": [
        [],
        [
          {
            "node": "Check if Platform is Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Not Story Post": {
      "main": [
        [
          {
            "node": "Check if Text-Only or Photo Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge All Post Types",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Run Daily at Multiple Times": {
      "main": [
        [
          {
            "node": "Load Facebook Credentials from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Facebook Text Post": {
      "main": [
        [
          {
            "node": "Update Sheet with Text Post URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Approved Facebook Posts": {
      "main": [
        [
          {
            "node": "Filter Posts Scheduled for Today",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Facebook Photo Post": {
      "main": [
        [
          {
            "node": "Update Sheet with Photo Post URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Platform is Facebook": {
      "main": [
        [
          {
            "node": "Check if Not Story Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet with Text Post URL": {
      "main": [
        [
          {
            "node": "Merge All Post Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Text-Only or Photo Post": {
      "main": [
        [
          {
            "node": "Schedule Facebook Text Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Image from Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image from Google Drive": {
      "main": [
        [
          {
            "node": "Schedule Facebook Photo Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Posts Scheduled for Today": {
      "main": [
        [
          {
            "node": "Loop Through Each Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet with Photo Post URL": {
      "main": [
        [
          {
            "node": "Merge All Post Types",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Load Facebook Credentials from Sheet": {
      "main": [
        [
          {
            "node": "Read Approved Facebook Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}