Here's a quick script I've knocked up that will purge/permanently email on a schedule that have a particular label and are in the trash/bin.
Make a copy of the script. Edit the parameters as required.
/*
****************************************************************************
Name:PurgeGmail
Version 1.01
Date: 30/9/16
Description: Script that will run automatically and permanently mail message
based on a label + Bin
Author: Rob Ardill - G Guite Top Contributor
Credits: Based on script http://www.labnol.org/internet/gmail-auto-purge/27605/
Requires: Advanced Google Services + Gmail API enabled
**************************** !!! IMPORTANT !!! ******************************
THIS SCRIPT WILL PERMANENTLY DELETE EMAIL.
NO WARRANTY PROVIDED OR LIABILITY ACCEPTED
INCORRECT USE OF THIS SCRIPT CAN LEAD TO LOSS
OF EMAIL!
****************************************************************************
INSTRUCTIONS
1. Update the values of the field GMAIL_LABEL.
2. Go to Resource -> Advanced Google Services and enable Gmail API.
3. Go to Run -> Initialize and authorize the script.
4. Go to Run -> Install to install the script.
Follwign step 4, the script will now be active and will run every day at 1am permanently removing any email that is in the trasb/bin and with the GMAIL_LABEL.
If there are more than 100 items to remove it will do so in batches of 100 every 2 minutes.
* If you want the script to run more frequently, you can adjust the trigger in the Function Install()
MANUAL USE
To manually run the script follow the above steps 1 to 3, then Go to Run -> purgeGmail
UNINSTALL
To unistall the script go to Run -> Uninstall to stop the purging script anytime.
*/
https://script.google.com/d/1cyYaIvxV038OB4QRYU0gisLhJVADQi4EHE2QaGYnBdI1ImD0YmKnc16G/edit?usp=sharing
Labels
G Suite
Google Workspace
Home Assistant
Tasmota
Drivers
Google
TYWE2S
Windows
ABC News
Arlec
Australian Broadcasting Corporation
Benexmart
Bigpond
Card Reader
Crapware
Docs
Drive
ESPHome
Feeds
File Management
Formula Force
G Suite Script
Gmail
Google Apps Script
Google Maps
Grid Connect
Internet Security
Java
Logitech
Maps
Mcafee
Mirabella
Oracle
Outlook
PrimalForms
RSS
Ricoh
Robocopy
Sapien
Shared Files
Tuya
Vault
Wheel
Windows 10
XP
gui
powershell
Saturday, 1 October 2016
Automatically purge email from Gmail.
Labels:
G Suite Script,
Google Apps Script
Rob Ardill is a long time (80's) computer enthusiast and IT consultant, working at several US startups and also various levels of government.
Rob specialises in SME level technologies from major vendors and was an earlier adopter of Google Workspace (formerly Google Apps/G Suite). He joined the PE program in 2009 and is one of the longest serving PE's, specialising in Google Workspace.
Rob lives in the southern wine region of Adelaide, Australia and motorcycles, plays soccer and runs LANTastic LAN parties in his spare time.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment