{
 "name": "Post today's ready rows from Google Sheets to a Facebook Page (AutomateRecipes)",
 "nodes": [
  {
   "parameters": {
    "rule": {
     "interval": [
      {
       "field": "cronExpression",
       "expression": "0 10 * * *"
      }
     ]
    }
   },
   "id": "e737c253-2dbc-554f-a9d4-0b6c687c6707",
   "name": "Every day 10:00",
   "type": "n8n-nodes-base.scheduleTrigger",
   "typeVersion": 1.2,
   "position": [
    0,
    0
   ]
  },
  {
   "parameters": {
    "documentId": {
     "__rl": true,
     "mode": "url",
     "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"
    },
    "sheetName": {
     "__rl": true,
     "mode": "name",
     "value": "Posts"
    },
    "options": {}
   },
   "id": "897fbe2c-eda1-52b3-ac89-28fced940a17",
   "name": "Sheets: read posts",
   "type": "n8n-nodes-base.googleSheets",
   "typeVersion": 4.5,
   "position": [
    220,
    0
   ],
   "credentials": {
    "googleSheetsOAuth2Api": {
     "id": "",
     "name": "YOUR_GOOGLESHEETSOAUTH2API_CREDENTIAL"
    }
   }
  },
  {
   "parameters": {
    "conditions": {
     "options": {
      "caseSensitive": false,
      "typeValidation": "loose",
      "version": 1
     },
     "combinator": "and",
     "conditions": [
      {
       "id": "f1",
       "leftValue": "={{ $json.Date }}",
       "rightValue": "={{ $now.toFormat('yyyy-MM-dd') }}",
       "operator": {
        "type": "string",
        "operation": "equals"
       }
      },
      {
       "id": "f2",
       "leftValue": "={{ $json.Status }}",
       "rightValue": "ready",
       "operator": {
        "type": "string",
        "operation": "equals"
       }
      }
     ]
    },
    "options": {}
   },
   "id": "44d68a7c-2a0c-5652-9896-07a8a53ac827",
   "name": "Today and ready",
   "type": "n8n-nodes-base.filter",
   "typeVersion": 2,
   "position": [
    440,
    0
   ]
  },
  {
   "parameters": {
    "httpRequestMethod": "POST",
    "graphApiVersion": "v20.0",
    "node": "YOUR_PAGE_ID",
    "edge": "feed",
    "options": {
     "queryParameters": {
      "parameter": [
       {
        "name": "message",
        "value": "={{ $json.Text }}"
       }
      ]
     }
    }
   },
   "id": "6045ee22-da0c-5115-b764-8d05c0240c47",
   "name": "Facebook Page: publish post",
   "type": "n8n-nodes-base.facebookGraphApi",
   "typeVersion": 1,
   "position": [
    660,
    0
   ],
   "credentials": {
    "facebookGraphApi": {
     "id": "",
     "name": "YOUR_FACEBOOKGRAPHAPI_CREDENTIAL"
    }
   }
  },
  {
   "parameters": {
    "operation": "update",
    "documentId": {
     "__rl": true,
     "mode": "url",
     "value": "https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit"
    },
    "sheetName": {
     "__rl": true,
     "mode": "name",
     "value": "Posts"
    },
    "columns": {
     "mappingMode": "defineBelow",
     "value": {
      "row_number": "={{ $('Today and ready').item.json.row_number }}",
      "Status": "posted"
     },
     "matchingColumns": [
      "row_number"
     ]
    },
    "options": {}
   },
   "id": "5f5bcded-fe36-5b09-9a23-7a8abe8faf5f",
   "name": "Sheets: mark posted",
   "type": "n8n-nodes-base.googleSheets",
   "typeVersion": 4.5,
   "position": [
    880,
    0
   ],
   "credentials": {
    "googleSheetsOAuth2Api": {
     "id": "",
     "name": "YOUR_GOOGLESHEETSOAUTH2API_CREDENTIAL"
    }
   }
  }
 ],
 "connections": {
  "Every day 10:00": {
   "main": [
    [
     {
      "node": "Sheets: read posts",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Sheets: read posts": {
   "main": [
    [
     {
      "node": "Today and ready",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Today and ready": {
   "main": [
    [
     {
      "node": "Facebook Page: publish post",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Facebook Page: publish post": {
   "main": [
    [
     {
      "node": "Sheets: mark posted",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1"
 },
 "active": false,
 "pinData": {},
 "meta": {
  "note": "Replace YOUR_* placeholders and attach your own credentials. Not tested on real services."
 }
}