{
  "name": "Archive empty pages in Notion database",
  "nodes": [
    {
      "id": null,
      "name": "Get All Databases",
      "type": "n8n-nodes-base.notion",
      "position": [
        240,
        300
      ]
    },
    {
      "id": null,
      "name": "Get All Database Pages",
      "type": "n8n-nodes-base.notion",
      "position": [
        420,
        300
      ]
    },
    {
      "id": null,
      "name": "Get Page Blocks",
      "type": "n8n-nodes-base.notion",
      "position": [
        1180,
        280
      ]
    },
    {
      "id": null,
      "name": "Process Blocks",
      "type": "n8n-nodes-base.function",
      "position": [
        1360,
        280
      ]
    },
    {
      "id": null,
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1000,
        280
      ]
    },
    {
      "id": null,
      "name": "Check for empty properties",
      "type": "n8n-nodes-base.function",
      "position": [
        600,
        300
      ]
    },
    {
      "id": null,
      "name": "Archive Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        1760,
        260
      ]
    },
    {
      "id": null,
      "name": "If toDelete",
      "type": "n8n-nodes-base.if",
      "position": [
        1560,
        280
      ]
    },
    {
      "id": null,
      "name": "If Empty Properties",
      "type": "n8n-nodes-base.if",
      "position": [
        760,
        300
      ]
    },
    {
      "id": null,
      "name": "Every day @ 2am",
      "type": "n8n-nodes-base.cron",
      "position": [
        80,
        300
      ]
    }
  ],
  "connections": {
    "If toDelete": {
      "main": [
        [
          {
            "node": "Archive Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Blocks": {
      "main": [
        [
          {
            "node": "If toDelete",
            "type": "main",
            "index": 0
          },
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches": {
      "main": [
        [
          {
            "node": "Get Page Blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every day @ 2am": {
      "main": [
        [
          {
            "node": "Get All Databases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Page Blocks": {
      "main": [
        [
          {
            "node": "Process Blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Databases": {
      "main": [
        [
          {
            "node": "Get All Database Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Empty Properties": {
      "main": [
        [
          {
            "node": "SplitInBatches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Database Pages": {
      "main": [
        [
          {
            "node": "Check for empty properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for empty properties": {
      "main": [
        [
          {
            "node": "If Empty Properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}