Advanced Automation · 9 min read · 2026-05-11
How to Delete Emails with Specific Keywords and Large Attachments
Target storage-hogging emails by combining specific subject keywords with large attachment filters in a single automated Gmail Playbook.
Specialized Storage Killers in Your Inbox
When people struggle with Google storage limits, they usually assume the culprit is Google Photos or Google Drive. However, inside many professional Gmail accounts lies a specialized class of heavy emails that silently devour gigabytes of storage: recurring automated system outputs and heavy media deliverables.
Consider these common real-world examples:
- Design & Video Production: Daily or weekly automated render exports containing subjects like "Weekly Render", "Preview Draft", or "High-Res Export", carrying 15 MB to 25 MB video or archive files.
- Software Development & DevOps: Automated nightly build artifacts with subjects like "Nightly Build Artifact", "Crash Dump Log", or "Database Backup", carrying 20 MB ZIP attachments.
- Finance & Operations: Daily accounting ledger dumps or inventory spreadsheets with subjects like "Daily Inventory Reconciliation" or "End of Day Audit", accompanied by 12 MB compressed spreadsheets.
You need these heavy emails when they arrive. But after 14 to 30 days, their operational value expires because a newer version has replaced them. Hoarding years of these reports leads directly to the dreaded Gmail Storage Full error.
In this guide, we show you how to target this exact intersection manually in Gmail, and then provide step-by-step instructions for configuring an automated cleanup Playbook using Smart Mailbox Cleaner.
The Manual Way: Gmail Search Operators for Keywords and Heavy Attachments
To find emails that contain a specific subject keyword and carry large attachments, you must combine text operators with size constraints.
1. The Core Intersection Query
In the Gmail search box, enter:
subject:"Weekly Render" has:attachment larger:10M older_than:14d
Let's break down this syntax:
subject:"Weekly Render": Matches conversations containing that exact phrase in the subject line. Wrapping the term in quotation marks ensures exact phrase matching.has:attachment: Restricts the search strictly to messages carrying binary file attachments.larger:10M: Sets a hard size floor of 10 Megabytes, ignoring text-only notifications or small thumbnail previews.older_than:14d: Provides a two-week safety window, ensuring that current week renders are preserved.
2. Targeting Multiple Subject Variations
If your automated reporting tool uses variable subject prefixes (e.g., "Weekly Render", "Daily Render", or "3D Preview"), chain them using boolean OR statements:
subject:("Weekly Render" OR "Daily Render" OR "Preview Draft") has:attachment larger:10M older_than:14d -is:starred
3. Executing the Manual Deletion
- Press Enter to run the search in Gmail.
- Select the top-left checkbox.
- Click "Select all conversations that match this search".
- Click the Trash icon.
- Empty your Gmail Trash to force Google to immediately reclaim your quota.
Why You Cannot Automate This Natively
Just like with other date-based queries, native Gmail filters cannot automate this. Gmail filters cannot inspect message age dynamically, nor can they conditionally evaluate file sizes on existing mail. You are stuck running this manual search every single week.
The Smart Way: Custom Scan Builder Step-by-Step Configuration
Smart Mailbox Cleaner turns this multi-variable search into an automated background routine.
Step-by-Step Query Setup in Custom Scan Builder
Follow these exact steps to build your custom scan:
Step 1: Open Custom Scan Builder
Sign in to your Smart Mailbox Cleaner Dashboard and navigate to the Custom Scan Builder.
Step 2: Configure the Subject Keyword Parameter
- Locate the Subject / Keyword field.
- Enter your exact target phrase enclosed in quotation marks:
"Weekly Render" (or your relevant phrase, such as "Build Artifact").
Step 3: Configure the Attachment Filter
- Locate the Has Attachment toggle.
- Set it explicitly to "Yes".
Step 4: Set the Minimum Size Threshold
- In the File Size filter, select "Larger than" and input 10 MB (or 15 MB depending on your typical file size).
Step 5: Configure the Age Buffer
- In the Date / Age selector, choose "Older than 14 Days" (or 30 Days). This guarantees you have two full weeks to review deliverables before the automated system touches them.
Step 6: Enable Safety Guardrails
- Under Protections, toggle "Exclude Starred" to ON. If a particular render was approved and starred as the final master copy, it is permanently protected.
Step 7: Verify Exact Metrics in Live Preview
Review the calculation panel on the right side of the screen:
- Target Conversations: e.g.,
86 emails. - Projected Storage Recovered: e.g.,
1.72 GB. - Deep-Dive Verification: Click "Expand Preview" to inspect file extensions (.mp4, .zip, .mov) and sender domains to ensure the query targets only automated exports.
Step 8: Save as an Automated Playbook
Click "Save as Playbook":
- Name: "Weekly Purge: Render Exports > 10MB".
- Schedule: Select Weekly (Every Sunday at 11:00 PM).
- Click "Activate Playbook".
How the Playbook Protects Your Storage on Autopilot
With this Playbook active:
- Every Sunday night, our servers query your Gmail metadata via Google OAuth.
- Any email matching
subject:"Weekly Render" with attachments over 10 MB that is older than 14 days is moved to Trash. - Your storage quota is continuously freed, preventing sudden mailbox lockouts.
- Our Storage Growth Predictor tracks how many gigabytes this Playbook prevents from accumulating over a 12-month period.
Comparison: Native Gmail vs. Smart Mailbox Cleaner Playbooks
| Feature | Native Gmail Workflow | Smart Mailbox Cleaner |
|---|
| Complex Multi-Filters | Must write error-prone search strings | Visual multi-slider interface |
| Size + Keyword Logic | Manual evaluation only | Unified compound rule execution |
| Automated Scheduling | Impossible | Scheduled weekly/monthly Playbooks |
| Reclaimed Storage Visibility | Blind guessing | Exact Gigabytes calculated before cleaning |
| Accidental Deletion Recovery | Difficult Trash reconstruction | 1-Click 30-Day Undo with original labels |
| Background Processing | Freezes active browser tab | Server-side execution; 0% computer load |
Strict Privacy and the 30-Day Undo Guarantee
Because work deliverables often involve intellectual property, our security architecture ensures absolute protection:
- Metadata-Only Processing: We only access email metadata — sender, date, size, labels. We never read email content. We never download or view the contents of your attachments.
- 30-Day Undo Guarantee: If an automated Playbook ever deletes a render draft you need to revisit, open your History Dashboard and click Undo. The entire batch is restored to its original Gmail folders with all labels intact.
- Affordable Plans: Start with your first cleanup free, or choose Starter (₹149/mo), Pro (₹349/mo), or Power (₹699/mo) on our Pricing Page.
Stop wasting Google storage on outdated renders and logs. Automate your heavy file cleanups today with Smart Mailbox Cleaner.
Related Reading
Frequently Asked Questions
What Gmail search operator combines keywords with large attachment filters?
The recommended operator is: subject:"Your Keyword" has:attachment larger:10M older_than:14d. This ensures only emails containing that specific phrase with heavy attachments are targeted.
Will this query delete emails that contain the keyword in the subject line but have no attachments?
No. Because the "has:attachment" filter is explicitly enabled, text-only emails containing the keyword will be completely ignored by the query.
Can I target specific file types like .zip, .mov, or .pdf with this automation?
Yes. In native Gmail, you can add "filename:mov" or "filename:zip" to the search. In Smart Mailbox Cleaner's Custom Scan Builder, you can filter by specific attachment file extensions.
How does Smart Mailbox Cleaner calculate attachment size without reading my files?
We inspect the message header metadata (MIME structure and payload headers) via the official Google API. This header reports the exact byte size of the payload without requiring our servers to download or read the file content.
What is the maximum email attachment size Gmail permits?
Gmail allows incoming emails up to 50 MB in size and outgoing emails up to 25 MB. Just twenty 50 MB emails consume 1 GB of your 15 GB free storage quota.
Try Smart Mailbox Cleaner free →