{
 "id": "socialpostschedu",
 "name": "AutomateRecipes \u2013 social-post-scheduler",
 "nodes": [
  {
   "parameters": {},
   "name": "Manual Trigger",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ],
   "id": "b4c44e98-676e-4297-869c-2256ca7f707b"
  },
  {
   "parameters": {
    "url": "http://127.0.0.1:9000/sheets/posts",
    "options": {}
   },
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "name": "S1 GET mock/sheets/posts",
   "position": [
    220,
    0
   ],
   "id": "c8040a90-be90-4681-b5ba-845a90fec433"
  },
  {
   "parameters": {
    "jsCode": "const r=$input.first().json.rows.filter(x=>x.date==='2026-10-16'&&x.status==='ready');if(r.length!==1)throw new Error('expected 1 ready row');return r.map(x=>({json:{row:x.row,service:'facebook/feed',payload:{message:x.text}}}));"
   },
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "name": "S2",
   "position": [
    440,
    0
   ],
   "id": "a8fe8554-6626-45f0-bd3e-de3c7a0d0f2b"
  },
  {
   "parameters": {
    "method": "POST",
    "url": "=http://127.0.0.1:9000/{{ $json.service }}",
    "sendBody": true,
    "specifyBody": "json",
    "jsonBody": "={{ JSON.stringify($json.payload) }}",
    "options": {}
   },
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "name": "S3 POST mock (send)",
   "position": [
    660,
    0
   ],
   "id": "130b66db-a602-47f1-b976-847257f6d8dc"
  },
  {
   "parameters": {
    "jsCode": "return [{json:{service:'sheets/update',payload:{row:$('S2').first().json.row,status:'posted'}}}];"
   },
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "name": "S4",
   "position": [
    880,
    0
   ],
   "id": "5e9ed324-21b3-48fa-95ae-ecc6572bd016"
  },
  {
   "parameters": {
    "method": "POST",
    "url": "=http://127.0.0.1:9000/{{ $json.service }}",
    "sendBody": true,
    "specifyBody": "json",
    "jsonBody": "={{ JSON.stringify($json.payload) }}",
    "options": {}
   },
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "name": "S5 POST mock (send)",
   "position": [
    1100,
    0
   ],
   "id": "4e9cf545-4e17-443c-8987-15004fc543c6"
  }
 ],
 "connections": {
  "Manual Trigger": {
   "main": [
    [
     {
      "node": "S1 GET mock/sheets/posts",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S1 GET mock/sheets/posts": {
   "main": [
    [
     {
      "node": "S2",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S2": {
   "main": [
    [
     {
      "node": "S3 POST mock (send)",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S3 POST mock (send)": {
   "main": [
    [
     {
      "node": "S4",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "S4": {
   "main": [
    [
     {
      "node": "S5 POST mock (send)",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {},
 "active": false,
 "pinData": {},
 "meta": {
  "note": "Tested on n8n 1.70.3 with local mocks for: Google Sheets rows, Facebook Pages post, Sheets update. Replace 'POST mock'/'GET mock' HTTP nodes with the real app nodes + credentials before production."
 }
}