Automate Gmail Inbox Archiving Daily
detail.loadingPreview
Declutter your Gmail inbox effortlessly with this n8n workflow. It automatically archives emails older than 24 hours every morning, ensuring your primary inbox only contains recent, actionable messages.
About This Workflow
Tired of a cluttered Gmail inbox? This n8n workflow provides a simple yet powerful solution to maintain inbox sanity. Running daily at 4 AM, it scans your Gmail 'INBOX' for any emails that are older than 24 hours. Instead of deleting them, the workflow intelligently removes the 'INBOX' label, effectively moving them to 'All Mail' – a gentle yet effective way to archive without losing data. This automation ensures your inbox remains a clean, focused space for current communications, boosting your productivity and reducing digital overwhelm.
Key Features
- Daily Automated Cleanup: Automatically triggers every day at 4 AM to clean your inbox without manual intervention.
- Intelligent Archiving: Targets and archives only emails older than 24 hours, keeping recent messages visible.
- Gmail Integration: Seamlessly connects with your Gmail account using OAuth2 for secure and reliable operations.
- Non-Destructive Archiving: Moves emails out of your inbox view by removing the 'INBOX' label, preserving all your messages in 'All Mail'.
How To Use
- Connect Your Gmail Account: In the 'Fetch Gmail Inbox Emails' node and 'Archive Message' node, click 'Credentials' and add your Gmail OAuth2 account. Grant the necessary permissions.
- Customize Trigger Time (Optional): In the 'Daily Trigger at 4AM' node, adjust the
triggerAtHourparameter if you prefer a different daily execution time. - Adjust Archive Age (Optional): The 'Fetch Gmail Inbox Emails' node is set to archive emails older than 24 hours. To change this, modify the
receivedBeforeexpression (e.g.,48 * 60 * 60 * 1000for 48 hours to archive emails older than 48 hours). - Activate the Workflow: Save the workflow and activate it to start automatically archiving old emails.
Apps Used
Workflow JSON
{
"id": "229e3aa7-ca39-4741-8114-35ab32a0a45e",
"name": "Automate Gmail Inbox Archiving Daily",
"nodes": 9,
"category": "Personal",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 229e3aa7-ca39...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Send Obsidian Notes as Emails with Dynamic Attachments
This workflow empowers you to transform your Obsidian notes into dynamic emails, complete with custom metadata from YAML frontmatter and automated attachment handling. Seamlessly share your thoughts and files directly from your preferred note-taking environment.
Smart Expense Tracking with Telegram & AI
Automate your personal finance management by turning your Telegram chat into an intelligent expense tracker. Simply send a photo of a receipt or a text message, and this workflow uses AI to categorize your spending, extract crucial details, and provide instant summaries.
Voice Task to Notion: AI-Powered Processing
This n8n workflow automates the intelligent processing of voice-activated tasks intended for Notion or similar tools. It leverages advanced AI to understand inputs, builds a dynamic knowledge base from them, and logs processing outcomes to Google Sheets. Instantly get alerted via Slack for any errors, ensuring reliable task management.