Related: would this tool let me analyze my gmail for cleanup? That is, identify which senders/domains send me the most email by number or size. Some way to automatically download large attachments and then deletes those. I know there are 3rd party apps that do this, but I don’t like giving access to random 3rd party apps.
I know this isn't exactly what you are looking for, but I run this search once every few months: [has:attachment larger:5M]
That finds everything bigger than 5 megabytes. You can't sort by size, but at least you can find big stuff. If that search has too many results, just keep upping the number until you find the few really big messages.
Hijacking this comment, but it seems likely to attract the right sort of crowd..
Can anyone recommend a Mac/web Gmail UI with exceptionally fast hotkey interactions? The Gmail web interface has slowed to the point of un-usability for me now.
Command line (Alpine, etc) would be fine, but my Gmail account is secured by work and has the required access control settings disabled.
That's an avenue I'm pursuing - have joined the waiting list and am waiting for someone to get back to me after a brief email interaction over the weekend.
Secured by work was a reference to one possible suggestion of using Alpine or similar, which requires app-specific passwords. And yes, it seems it is possible to block that!
I’m working on a native Mac email client for Gmail that uses the Gmail API and support Gmail-specific features like labels and categorized inboxes. If you’re able enable access for 3rd party apps, and interested in beta testing this, would love to have you sign up at https://mimestream.com
Have you tried deleting a very large number of messages? I am talking about > 100,000. I once needed to clean up > million messages and it was rather challenging even utilizing Google's scripting. Batching ( within Google's recommended parameters ) would periodically fail. Triggers would not run. etc.
I've had the same issue spanning years. I didn't bother going further than the web UI. I would delete 100k+ messages, it would hang, and when it returned it would only have deleted like 70k.
Having gone through this recently you'll see a spinner/progress indicator. Then a short time later it'll terminate and half your messages will still be present.
I took several days deleting a few hundred thousand messages, "Select all", "delete". Each time it would remove 1000-10,000 messages and leave the rest. Was a real pain.
After a lot of trial and error I have been successful at doing a limit fetch and limit delete with a limit of 9000 in 5 minute intervals using scripting API with a registering a timed trigger.
1. Get current time, increase the time by 5 minutes and find the 5 minute mark after that.
2. Register itself to run the time determined in (1).
3. Fetch a batch of 9000 ids matching the filter.
4. Delete the batch
This script would comfortably run for days cleaning out the inbox until it would hit some weird message that looked nearly identical to the messages around it and bomb(!?). Running it by hand would bomb at which point script won't be able to continue to execute. Deleting a message by hand would work. Running the script again after the manual deletion would work.
My first thought after "how hard can it be? Since all the messages are from the monitoring systems I can just assign the labels based on the 'from' address and..." was to use that exact approach. It have never seen that many timeouts in my life.
This is sweet. If you're interested, I'd be happy to help out with your todo to integrate with a local database. Getting the rate-limiting and retries right can be a little tricky but it's been on my list to add Gmail support to AspenDB https://github.com/aspen-cloud/aspen-cli.
Same, I go even more ruthless. Any unread email over a week old gets marked read, any read email over a week old gets archived.
All Updates, Social, Promotion emails get marked read on arrival.
All Primary inbox emails get intercepted on arrival and batched back into inbox on a schedule (usually twice a day).
I sit at zero most of the time, and ive only ever missed emails a bare handful of times, so seems to work.
I use a simple Apps Script. A filter adds a "New Messages" label to incoming "category:primary" and skips inbox, then the script on timer triggers remove the label and put them back in inbox
I did something similar - in fact looking at the add filter, very similar, where I add a label to certain mails by query and then delete - but the weirdest part was i could not auto-create one new filter - i have to re-create them all (so if I want to add a 21st filter with 20 still there my create filter routine needs to apply 21 filters. I just have it trying to reduce the spam and should spend some time trying to add new filters - one day.
But this is cool and love to know if there is a "add one" feature i missed.