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.
Download this n8n workflow template and start using it instantly.
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.
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.
Cron n8n node set to run daily at 2 am. Activate the workflow to schedule the automated maintenance. 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.
Use this complex n8n workflow to intelligently query AppSheet data using conversational AI, dynamic schema analysis, and Cohere reranking for precise results. Discover advanced n8n templates.

Use this advanced n8n workflow to deploy a dynamic AI assistant powered by Anthropic's Claude Sonnet 4 and Opus 4. It includes intelligent routing, web search, memory, and tool integration, leveraging multiple n8n node types for optimal performance.

Build a powerful RAG (Retrieval-Augmented Generation) chatbot using n8n that processes PDFs from Google Drive, indexes them in Pinecone, and answers WhatsApp queries automatically. Use this n8n workflow template.

Automate the scraping of trending TikTok hashtags using a powerful n8n workflow, Apify, and Airtable. This specific n8n template runs monthly to archive key social media insights.

Use this powerful n8n workflow to transform web articles captured from RSS feeds or Telegram into perfectly formatted, sequential Bluesky threads using JinaAI for extraction and Google Gemini or OpenAI for generative summarization. Download the n8n templates.

Leverage this powerful n8n workflow to automate the summarization of Arxiv research papers. It uses advanced n8n node functions (LangChain, OpenAI) to scrape content, summarize complex topics, and deliver structured JSON output.









































