{
  "name": "Scan Confluence pages with the REST API for inactive page owners",
  "nodes": [
    {
      "id": "c086fcf0-432b-40cf-977b-2047e3cc22fe",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -576,
        368
      ]
    },
    {
      "id": "88f7adf4-ac0a-436b-b694-660c284d5219",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -352,
        368
      ]
    },
    {
      "id": "12fd5670-dddb-4339-9106-9e128bd38255",
      "name": "Confluence - Get Spaces",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -128,
        368
      ]
    },
    {
      "id": "005cc50a-f0a0-4d38-8be3-75cb38db6522",
      "name": "Format Space Ids",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        368
      ]
    },
    {
      "id": "3a05c1bf-b9cb-4968-98cf-1b95f44eda2d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        192
      ],
      "parameters": {
        "width": 416,
        "height": 128,
        "content": "## Confluence API Reference\n* [V2 Get Spaces](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space/#api-spaces-get)\n* [V2 Get Pages](https://developer.atlassian.com/cloud/confluenc"
      }
    },
    {
      "id": "15570967-a2a8-4c45-82e5-8b09fd3f7b46",
      "name": "Confluence - Get Pages",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        368
      ]
    },
    {
      "id": "6659d1bf-73d9-4055-a6a3-56928cda0d61",
      "name": "Confluence - Bulk User Lookup",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        272
      ]
    },
    {
      "id": "e3fba098-2711-48b1-930f-e42a5fc0bd91",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1440,
        368
      ]
    },
    {
      "id": "a3f1c5d8-c3c7-4ffd-b3ea-c203e384f74b",
      "name": "Filter Inactive Owners",
      "type": "n8n-nodes-base.filter",
      "position": [
        1216,
        272
      ]
    },
    {
      "id": "0dcd521a-ea61-4153-9973-78a275c2d159",
      "name": "Split Out Users",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        992,
        272
      ]
    },
    {
      "id": "a17b4b53-c16e-4d3a-a583-23f0e69348c7",
      "name": "Split Out Pages",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1216,
        464
      ]
    },
    {
      "id": "fd7b5f06-90b1-4041-9468-56ba49859a7f",
      "name": "Format unique ownerIds",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        272
      ]
    },
    {
      "id": "730b5eec-ffcd-40e7-b1f0-f20a110ca55e",
      "name": "Filter Inactive Pages",
      "type": "n8n-nodes-base.filter",
      "position": [
        1664,
        368
      ]
    },
    {
      "id": "febbb559-a41e-46df-93cb-0942d318206e",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2112,
        368
      ]
    },
    {
      "id": "6825f1be-d9a5-493d-a023-861689bef4a9",
      "name": "Set Report Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        368
      ]
    },
    {
      "id": "194c5474-6f34-4000-8e2f-5bd192761bb1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        208
      ],
      "parameters": {
        "width": 880,
        "height": 240,
        "content": "## Find inactive users"
      }
    },
    {
      "id": "e2313f81-30ad-45cc-9c8d-956995b25b87",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        720
      ],
      "parameters": {
        "width": 752,
        "height": 144,
        "content": "### Notes\n- Requires Confluence permissions to read spaces, pages and users.\n- Pages are considered problematic if `accountStatus !== active`.\n- Current page fetch limit is `50` items per request.\n- N"
      }
    },
    {
      "id": "015bd1d1-9f4b-48e5-a40a-8658f50af782",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        304
      ],
      "parameters": {
        "width": 656,
        "height": 240,
        "content": "## Get Confluence pages"
      }
    },
    {
      "id": "f4c1ab5e-069a-4f25-a711-f382a0a38747",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        288
      ],
      "parameters": {
        "width": 704,
        "height": 240,
        "content": "## Filter pages with inactive owner"
      }
    },
    {
      "id": "48b137b5-8d65-4d2a-89c5-7e7d67c03e41",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        192
      ],
      "parameters": {
        "width": 752,
        "height": 512,
        "content": "## How it works\nThis workflow finds Confluence pages whose owners are no longer active. A **Set Variables** node defines the Atlassian domain and the space keys to scan.\n\nUsing the **Confluence API v2"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Filter Inactive Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Confluence - Get Spaces",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Report Data": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Pages": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Out Users": {
      "main": [
        [
          {
            "node": "Filter Inactive Owners",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Space Ids": {
      "main": [
        [
          {
            "node": "Confluence - Get Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Inactive Pages": {
      "main": [
        [
          {
            "node": "Set Report Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confluence - Get Pages": {
      "main": [
        [
          {
            "node": "Format unique ownerIds",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Inactive Owners": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format unique ownerIds": {
      "main": [
        [
          {
            "node": "Confluence - Bulk User Lookup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confluence - Get Spaces": {
      "main": [
        [
          {
            "node": "Format Space Ids",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confluence - Bulk User Lookup": {
      "main": [
        [
          {
            "node": "Split Out Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}