ChatGPT fails rather a lot, however the cause tens of millions of us use it’s as a result of, when it really works effectively, there’s nothing else prefer it.
I had that have just lately once I was combating a seemingly easy Gmail difficulty. In quick, my inbox was uncontrolled, with six figures of unread messages, and the mere presence of that quantity was a every day reminder of my poor family administration.
None of these unread emails have been notably necessary. I had been tagging and responding to cues, and utilizing filters to floor must-reads. But I let the weeds fully overwhelm the Gmail flower mattress and it was time to get out the trowel.
No drawback, I assumed, I’ll simply take the nuclear choice and do a large ‘choose all’ and ‘mark all as learn’ to have a clear slate. Except doing that, in lots of variations, did not work. Apparently Gmail has a secret inner restrict for bulk operations, and I used to be effectively above that quantity.
Even doing it in batches utilizing Gmail Search Operators It wasn’t working. My ridiculous inbox had apparently damaged Gmail’s mind and Google could not assist.
Fortunately, that is the place a software that I now deal with like an eccentric uncle (extremely good in some methods, worryingly flawed in others) got here to the rescue…
Going off script
I discovered ChatGPT to be an enormous assist when it took my poorly worded message and located an answer that may by no means have crossed my thoughts in one million years. This normally entails coding.
For my Gmail drawback, it recommended me to make use of Google Apps Script. This platform is one thing I’ve by no means heard of (partly as a result of it is a Google Workspace factor), however it’s apparently an unsung hero for automating easy duties, notably in apps like Docs, Sheets, and Gmail.
I’ve since discovered that individuals use Gmail Apps Script to automate every kind of issues, from enterprise administration to giveaway spreadsheets for mates. But it was additionally the trick I wanted to get round Gmail’s cussed limits for bulk operations.
After the standard backwards and forwards with ChatGPT, he perfected somewhat script that may search my Gmail inbox for chunks of 500 unread threads and mark them as “learn,” till I reached the “inbox zero” nirvana that I assumed can be a lot simpler to attain.
The course of was so simple as going to Google Apps Scriptby clicking ‘New Project’, pasting the script (which ChatGPT assured me was “totally balanced and examined”), clicking the ‘Save’ icon, after which urgent the ‘Run’ button. The script began taking part in within the background and I watched as my inbox slowly reached zero.
How to make use of ChatGPT?
ChatGPT would not pull its knowledge out of skinny air and I’ve little question that its Gmail resolution (maybe a lot of the script itself) was “impressed” by threads from the likes of Stack Overflow and Google Support.
The factor is, looking on Google did not flip up any of them and I used to be left going round in circles earlier than ChatGPT intervened. The different nice power of chatbots (once more, after they do issues proper) is that they’ll adapt options and code to your actual scenario.
That does not imply you should not double-check every thing they are saying, and I had a little bit of trepidation working a script I did not totally perceive on my Gmail account. But after scanning the very primary code for any issues, I used to be pleased to present it a strive, and I’m glad I did.
For me, this barely dry however helpful train summed up how I presently use chatbots like ChatGPT, and it looks like I’m the bulk. A latest research highlighted by Search engine land suggests {that a} whopping 95% of ChatGPT customers nonetheless use Google; In different phrases, the chatbot is a Google add-on relatively than a alternative.
ChatGPT is, as I discussed above, that eccentric and generally genius man I am going to with thorny issues that I simply cannot resolve utilizing pre-chatbot strategies. And whereas I definitely do not belief his recollection of stories occasions (a latest BBC studio discovered that 45% of AI information chatbot responses had a “main difficulty”), I’ll at all times come again to it for these flashes of inspiration.
If you are in an analogous Gmail inbox conundrum as me and need to strive a (probably over-engineered) resolution to get to inbox zero, here is the Google Apps Script code that labored for me (thanks, ChatGPT). My solely problem now could be to remain there.
operate markAllAsReadSafe() { var searchBatchSize = 500; // what number of threads to request from Gmail without delay var apiMax = 100; // GmailApp.markThreadsRead accepts at most 100 threads per name var completeMarked = 0; do { // entry unread searchBatchSize threads (latest first) var threads = GmailApp.search(‘is:unread’, 0, searchBatchSize); if (threads.size == 0) break; // course of in subbatches of apiMax for (var i = 0; i < threads.size; i += apiMax) { var slice = threads.slice(i, i + apiMax); strive { GmailApp.markThreadsRead(slice); completeMarked += reduce.size; } catch (e) { Logger.log('Error marking learn threads for section beginning at ' + i + ': ' + e); // pause briefly and proceed Utilities.sleep(2000); } // small pause to cut back the prospect of slowing down Utilities.sleep(500); } Logger.log('Marked ' + completeMarked + ' threads thus far.'); // the loop continues if Gmail returned a full batch (means there are in all probability extra) } whereas (threads.size === searchBatchSize); Logger.log('Done. Total threads marked as learn: ' + completeMarked); }
