n8n

How to Automate Notion Page Cleanup?

Keep your Notion workspace clean without lifting a finger. This automation scans your databases every night and archives pages that are clearly empty, so your team sees only real content. It helps content teams, ops leaders, and project owners keep focus while cutting clutter.

A scheduled timer at 2am starts the job. It pulls every Notion database, gets all pages inside, and checks for pages with no real data. First it looks for empty properties across the page. If the page passes that check, it then fetches the page blocks and looks for actual content. Pages flagged as empty are routed to an archive step, while others are left alone. Batch processing makes the scan safe for larger workspaces.

Setup is simple. Connect your Notion account, share the databases with the integration, and keep the default schedule or pick your own. Expect faster search, cleaner dashboards, and fewer mistakes. Great for publishing pipelines, CRM style boards, knowledge bases, and any team that collects lots of drafts or test entries.

What are the key features?

  • Daily schedule at 2am triggers a full scan of your Notion workspace.
  • Fetches all databases and their pages using the Notion API.
  • Checks page properties to detect records with no meaningful data.
  • Retrieves page blocks to confirm whether a page has real content or is empty.
  • Two step filter reduces false positives before archiving a page.
  • Split in batches to process pages one at a time for stability.
  • Conditional logic only archives pages that meet the empty rules.
  • Uses the Notion archive action to safely move pages out of active views.

What are the benefits?

  • Reduce manual cleanup from 60 minutes to 5 minutes each day
  • Remove empty pages overnight to keep databases clear
  • Improve data quality by removing blank records before they confuse reports
  • Keep Notion faster by trimming unused pages at scale
  • Scan thousands of pages safely using batch processing

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Notion. See the Tools Required section above for links to create accounts with these services.
  3. In Notion, create or use an existing workspace and make sure you have permission to install integrations.
  4. In n8n Cloud, double click any Notion node, then on the 'Credential to connect with' dropdown, click 'Create new credential' and follow the on screen instructions to sign in to Notion and approve access.
  5. In Notion, open each database you want to include and share it with the connected integration so the bot can read and archive pages.
  6. Back in n8n, ensure all Notion nodes use the same credential. Open Get All Databases, Get All Database Pages, Get Page Blocks, and Archive Page and select the credential you created.
  7. Review the Cron node. It is set to run every day at 2am. Adjust the time if you need a different window.
  8. Run a safe test: disable the Archive Page node, execute the workflow once, and check the outputs of the If nodes to see which pages would be archived.
  9. If the results look correct, enable the Archive Page node and run again on a small set. You can temporarily reduce volume by stopping the workflow after the first batch.
  10. Validate in Notion that archived pages moved out of active views. Restore one page to confirm you can reverse changes if needed.
  11. Troubleshooting: If no pages are found, make sure the integration has access to each database. If rate limits appear, let the workflow run on schedule instead of manual repeated runs.
  12. Monitor n8n execution history weekly. Adjust the empty page rules in the function nodes if your content rules change.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Notion

Sign up

Free plan: $0 per member / mo (Public API included)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.