Smart Inbox Zero: Archive Unstarred Gmail Automatically
detail.loadingPreview
Achieve Inbox Zero effortlessly with this n8n workflow that automatically archives all unstarred emails from your Gmail inbox daily. Focus only on what truly matters by keeping your starred messages visible, ensuring your most important communications are always at the forefront.
About This Workflow
Tired of an overflowing inbox? This powerful n8n workflow brings peace of mind by automating your Gmail cleanup. Running on a customizable schedule, it intelligently scans your inbox for new emails received in the last day. The core of its magic lies in its ability to differentiate: it identifies and keeps any email threads containing starred messages, while gracefully archiving all others. This means your critical communications remain easily accessible, preventing important items from getting lost in the daily deluge, and helping you maintain a perpetually clean and organized inbox without manual effort. Perfect for professionals and busy individuals aiming to boost productivity.
Key Features
- Automated Daily Cleanup: Set it and forget it! Automatically processes your inbox every weekday night (or customize your schedule).
- Intelligent Prioritization: Distinguishes between important (starred) and less critical emails, keeping your focus on what truly needs attention.
- Inbox Zero Made Easy: Effortlessly archives unstarred email threads and messages, decluttering your inbox without deleting anything.
- Gmail Integration: Seamlessly connects with your Gmail account to manage emails directly.
- Customizable Schedule: Adapt the workflow to run daily, weekly, or at specific times to fit your personal or work routine.
How To Use
- Add Gmail Credentials: Start by adding your Gmail OAuth2 credentials to n8n. You'll need to create a new credential for Gmail and connect your account.
- Configure Schedule Trigger: The "At midnight every work day" node is pre-configured to run weekdays at midnight. Adjust the
cronExpression(e.g.,0 0 * * *for daily) in its parameters if you prefer a different schedule (e.g., daily for personal emails). - Review Gmail Nodes: The "Get all emails in the last day" and "Get the thread of each email" nodes use your Gmail credentials to retrieve recent inbox activity. Ensure your Gmail OAuth2 credential is selected.
- Verify Filter Logic: The "Keep only starred emails in inbox" node's condition (
JSON.stringify($json.messages).includes('STARRED')) currently passes starred threads. To achieve the "keep starred, archive unstarred" intent (as suggested by the sticky note), you will likely need to invert this logic. A common way is to toggle the "Invert" option within the filter node's settings, or change the condition to!JSON.stringify($json.messages).includes('STARRED'). This ensures unstarred emails are passed for archiving, and starred emails are stopped. - Activate Workflow: Once configured, activate the workflow. It will now automatically manage your inbox according to your schedule and filter logic.
Apps Used
Workflow JSON
{
"id": "a8b5b9e9-70c8-4751-8dfa-75be8f8d3fd3",
"name": "Smart Inbox Zero: Archive Unstarred Gmail Automatically",
"nodes": 24,
"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: a8b5b9e9-70c8...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
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.