{
  "name": "🧹 Archive (delete) duplicate items from a Notion database",
  "nodes": [
    {
      "id": "b758ce01-7f5e-4bdc-a4c3-6c00d6bc022a",
      "name": "Every day",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -180,
        660
      ]
    },
    {
      "id": "1ca45ba5-4635-4710-9807-26f22d535059",
      "name": "Get pages from database",
      "type": "n8n-nodes-base.notion",
      "position": [
        60,
        560
      ]
    },
    {
      "id": "ef8c8cfa-12fb-4fb9-8552-09f69f1f358d",
      "name": "Aggregate all items",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        500,
        560
      ]
    },
    {
      "id": "f1c3c0ad-f904-4d63-a131-0b045a21ce04",
      "name": "Format items properly",
      "type": "n8n-nodes-base.set",
      "position": [
        280,
        560
      ]
    },
    {
      "id": "5d39d3b7-604d-4aca-bf9a-3bb09bddad66",
      "name": "Filter duplicates",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        560
      ]
    },
    {
      "id": "55a8f0eb-702b-4056-a28c-96a7ade7c2cd",
      "name": "Archive pages",
      "type": "n8n-nodes-base.notion",
      "position": [
        920,
        560
      ]
    },
    {
      "id": "2c9655ea-401c-410b-a4b1-b001ae6dbe4b",
      "name": "When a page is added to the database",
      "type": "n8n-nodes-base.notionTrigger",
      "position": [
        -180,
        460
      ]
    },
    {
      "id": "672b647c-d009-45c3-b69e-6dfe85992e15",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 860,
        "height": 460,
        "content": "## 🧹 Archive (delete) extra duplicate items from Notion database\n### ABOUT THIS WORKFLOW\nThis n8n workflow automatically gets duplicate database pages based on a property and \"archives\" them (equivale"
      }
    },
    {
      "id": "83881bd3-60e3-40be-a469-0b7acb21d2be",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        400
      ],
      "parameters": {
        "width": 220,
        "height": 420,
        "content": "## TRIGGERS"
      }
    },
    {
      "id": "cd4b8717-19ae-42d6-ac87-bbdd071dd774",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        480
      ],
      "parameters": {
        "width": 860,
        "height": 340,
        "content": "## GET DUPLICATE PAGES"
      }
    },
    {
      "id": "087fb844-2241-4ed9-976d-9bdc7ccd8aa5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        400
      ],
      "parameters": {
        "width": 180,
        "height": 420,
        "content": "## ARCHIVE (DELETE)"
      }
    }
  ],
  "connections": {
    "Every day": {
      "main": [
        [
          {
            "node": "Get pages from database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter duplicates": {
      "main": [
        [
          {
            "node": "Archive pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate all items": {
      "main": [
        [
          {
            "node": "Filter duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format items properly": {
      "main": [
        [
          {
            "node": "Aggregate all items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get pages from database": {
      "main": [
        [
          {
            "node": "Format items properly",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When a page is added to the database": {
      "main": [
        [
          {
            "node": "Get pages from database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}