---
name: notion-stale-docs-audit
description: "On the 1st of each month: wiki pages in Notion not edited in 180 days, who wrote and last edited each one, and a question on what to do with them. Use when the user asks for this, or when it runs on a schedule."
---

# Notion stale docs audit

On the 1st of each month: wiki pages in Notion not edited in 180 days, who wrote and last edited each one, and a question on what to do with them.

Every team wiki in Notion has an onboarding page that still tells new hires to ask someone who left a year ago. Nobody deletes it, because nobody is sure it is wrong, and search keeps serving it up.

Once a month the agent lists the wiki pages that have gone 180 days without an edit, with who wrote them and who touched them last. You decide in one answer: ask each owner to look, trash the clearly dead ones, or go through them one by one.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Notion integration with Read content and Read user information capabilities, shared with the wiki pages; add Update content and Insert comments if it should act on your answer.
- The Notion MCP server can read these pages too, but its search is built for finding pages by topic; the API integration gives an explicit sort by last edit, which is what this audit needs.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Search oldest edits first** (Notion): Call `POST /v1/search` with `filter: { property: "object", value: "page" }`, `sort: { timestamp: "last_edited_time", direction: "ascending" }` and `page_size: 100`, paging with `start_cursor`. Stop once `last_edited_time` is less than 180 days old.
2. **Keep the wiki** (Notion): Keep pages that sit under the wiki pages or teamspaces you named, walking `parent.page_id` upward with `GET /v1/pages/{id}`. Skip pages whose parent is a database, such as task rows and meeting notes, unless you asked for them.
3. **Name the people** (Notion): Look up `created_by.id` and `last_edited_by.id` with `GET /v1/users/{id}`. Mark people who no longer appear in `GET /v1/users`, since their pages have no one to ask.
4. **Ask, then act** (Notion): Post the list as an ask. To ask owners, add a comment on each page with `POST /v1/comments` that mentions the last editor. To trash a page, call `PATCH /v1/pages/{id}` with `in_trash: true`; it can be restored from Trash.

## Route B: the browser

### What you need

- Signed in to Notion as a workspace member with at least Can view on the wikis, Can comment to leave comments, and Full access on a page to trash it.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://www.notion.so/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Search with a last-edited filter**: In the Notion web app pick the workspace, open **Search** from the sidebar and leave the query empty. Add the **Date** filter set to **Last edited**, **Before**, with the date 180 days ago, and under **In** pick the wiki page or teamspace to audit. Set **Sort** to `Last edited: Oldest first`. Untick anything that filters to titles only.
2. **Skip database rows**: Each result shows its breadcrumb. Leave out rows that live inside a database (tasks, meeting notes, CRM entries) unless the audit should include them, and keep pages under the wiki.
3. **Read who wrote and last edited each page**: Open each page: the **Edited** timestamp at the top names the last editor on hover, and **Page history** (in the `...` menu) shows the earliest version and its author. Members who are gone show as deactivated or appear in **Settings > People** no longer; mark those.
4. **Ask, then act**: Post the list by wiki, oldest first, and the question. To ask owners, add a comment on the page mentioning the last editor with `@`. To trash, use **Move to Trash** in the page menu; it can be restored from **Trash** in the sidebar.

Note: Notion search returns results in pages of a few dozen as you scroll, and reading the creator means opening each page, so this route suits a wiki of up to a hundred or so stale pages. Workspace owners on Enterprise plans also have a content search under Settings with last-edited columns, which is faster for large workspaces.

## The report

- **Stale pages**: how many, and how many were last edited by people who have left.
- **By space** or top-level wiki page.
- **The list**, oldest first: page, where it lives, last edited, by whom, and who created it.
- The ask: comment to each owner, trash the oldest, go one by one, or leave them.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "notion-stale-docs-audit/<date of this run, e.g. 2026-10-16>",
  "item_key": "notion-stale-docs-audit",
  "project": "Acme",
  "source": "Notion stale docs audit skill",
  "kind": "action",
  "title": "23 wiki pages untouched for 6 months",
  "summary": "**23** pages in the team wikis were last edited more than 180 days ago, and **7** of them were last edited by people who have left.",
  "action": {
    "request": "What should happen to these 23 pages?",
    "options": [
      "Ask each owner to review",
      "Trash the 5 oldest",
      "Go one by one",
      "Leave them"
    ]
  },
  "widget": [
    {
      "type": "Badges",
      "props": {
        "items": [
          {
            "label": "Engineering 11"
          },
          {
            "label": "Company wiki 6"
          },
          {
            "label": "Marketing 4"
          },
          {
            "label": "Customer success 2"
          }
        ]
      }
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Page",
          "Wiki",
          "Last edited",
          "By"
        ],
        "align": [
          "left",
          "left",
          "right",
          "left"
        ],
        "rows": [
          [
            "Deploying to staging",
            "Engineering",
            "412 days ago",
            "Sam (left)"
          ],
          [
            "On-call handbook",
            "Engineering",
            "298 days ago",
            "Priya"
          ],
          [
            "Expense policy",
            "Company wiki",
            "265 days ago",
            "Dana"
          ],
          [
            "Brand voice guide",
            "Marketing",
            "240 days ago",
            "Lena (left)"
          ],
          [
            "Customer onboarding checklist",
            "Customer success",
            "221 days ago",
            "Marco"
          ],
          [
            "Local dev setup",
            "Engineering",
            "196 days ago",
            "Theo"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Start with \"Deploying to staging\": it is the oldest, and the person who last edited it has left.",
        "tone": "warn"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: 1st of the month at 10:00 (`0 10 1 * *`). From cron, with the agent signed in on that machine:

```bash
0 10 1 * * claude -p "Run the notion-stale-docs-audit skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/notion-stale-docs-audit#schedule

Source: https://briefkin.dev/skills/notion-stale-docs-audit
