3 ms·
I've talked to chatgpt about bulk deleting email and it suggested a script on the Google sheets?! Apparently it was quite simple and you don't have to give acce
by atum47 2y ago
I've talked to chatgpt about bulk deleting email and it suggested a script on the Google sheets?! Apparently it was quite simple and you don't have to give access to a third party app.
- atum47 2y agoHere’s an example of how you might use Google Apps Script to bulk delete emails from Gmail: Steps: 1. Open Google Sheets (or any other Google app that supports Apps Script). 2. Open the Script Editor: In Sheets, go to Extensions > Apps Script. 3. Write the Script: function deleteOldEmails() { var threads = GmailApp.search('older_than:1y'); // Modify query as needed for (var i = 0; i < threads.length; i++) { threads[i].moveToTrash(); // Move emails to trash } } This example deletes emails older than one year (older_than:1y). You can modify the search query for different criteria (e.g., label:unread, from:specific@example.com, before:YYYY/MM/DD). 4. Save the Script. 5. Run the Script: Click the play icon to run the script. It will ask for permissions the first time. This method allows you to automate email management using custom queries. Would you like to proceed with something like this, or were you thinking of a different approach?
- onlypassingthru 2y agoTo be fair, writing your own apps script is a little more involved, although one of the major LLMs should get you most of the way there.