Automated Notion Empty Page Archiver - n8n Workflow

Use this automated n8n workflow to scan your Notion databases daily, identify pages with empty properties and zero content blocks, and automatically archive them to reduce clutter.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Notion Power Users with large, complex workspaces.

  • Teams seeking automated digital hygiene solutions.

  • Administrators who need to maintain clean, searchable databases.

  • Users looking for advanced, scheduled n8n templates for database maintenance.

Overview

Maintaining cleanliness within large Notion workspaces can be challenging, especially when drafts or placeholder pages accumulate. This powerful n8n workflow solves the problem of 'database sprawl' by automatically identifying and archiving pages that lack meaningful data, saving manual cleanup time.

This specific n8n template runs daily, providing continuous maintenance. It employs sophisticated filtering via custom JavaScript in the Function n8n node to check two critical conditions: first, if all page properties are empty, and second, if the page body contains any content blocks. Only pages that fail both checks are archived, ensuring that crucial data is never accidentally deleted. Implementing this automated n8n solution is essential for efficient project task management.

How it Works

This automation starts with the Every day @ 2am n8n trigger, initiating a daily cleanup routine. The n8n workflow immediately uses the Notion n8n node to fetch all accessible databases and subsequently, all pages within those databases.

The critical step is the Check for empty properties function n8n node, which assigns a toDelete flag if all database properties (like Title, Tags, Status) are empty. The flow then passes through the If Empty Properties n8n node, filtering only candidates for archiving.

These filtered items proceed to the SplitInBatches n8n node for processing one by one. For each page, the Get Page Blocks n8n node retrieves the actual page content. The subsequent Process Blocks function n8n node executes a final, robust check: verifying if the page content blocks themselves are empty. If both property and content checks confirm the page is empty, the final If toDelete n8n node directs the process to the Archive Page n8n node, effectively cleaning your Notion database with this streamlined n8n workflow.

Installation Guide


  1. Import the n8n template: Copy the provided JSON into your n8n interface by selecting 'New' and 'Import from JSON'.

  2. Notion Credentials: You must update the credentials in the 'Get All Databases', 'Get All Database Pages', 'Get Page Blocks', and 'Archive Page' n8n node steps. Ensure your Notion integration token has access to the databases you intend to manage.

  3. Activate the n8n trigger: The workflow is configured with a Cron n8n node set to run daily at 2 am. Activate the workflow to schedule the automated maintenance.

Node Details

Every day @ 2am (Cron Trigger): Acts as the n8n trigger, initiating the daily check at 2:00 AM.
Get All Databases / Get All Database Pages (Notion n8n node): These nodes handle the bulk data retrieval, pulling all databases and the pages within them from Notion.
Check for empty properties (Function n8n node): A core logic n8n node that iterates through page properties, setting a toDelete: true flag if all properties are vacant. This reduces the number of items needing deeper content inspection.
If Empty Properties (If n8n node): Filters pages based on the property check before proceeding to content analysis.
Get Page Blocks (Notion n8n node): Retrieves the structural content blocks of the page body using the page ID.
Process Blocks (Function n8n node): The final content validation n8n node. It checks if content blocks exist and if their textual components are empty. It determines the final toDelete status.


  • Archive Page (Notion n8n node): Executes the final action, archiving the page identified as empty.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by
Jonathan
Jonathan

Featured*