How to automatically delete old messages from Gmail
Web Services / / December 25, 2019
Email service Gmail is such a versatile tool that for many it has long been stepped beyond the narrow confines just a mail client. For example, you can successfully use the postal service for reading RSS, as task manager for the storage of useful links. However, this approach may lead to a gradual accumulation of too many emails that you just do not have time to clean up.
A radical way to avoid this is to automatically delete messages that are older than the predetermined by you period, according to the principle "if I this month have not done anything with this letter, it is unlikely that it is I have ever been useful." In this article you will find a step by step manual on automatic clearing Gmail inbox without extraneous programs.
1. go to this link Google in a special section for creating scripts. Press the blue button Start Scripting.
2. In the pop-up window, select the empty project.
3. Copy the code below and paste it in the window for creating a script. Edit the desired line 2 and 4, by inserting to a friendly name. Line 7 is defined by how many days messages will be deleted.
4. In the creation of the script, click the button Current project's triggers (Round watch). In the pop-up window to add a new trigger.
5. In the new window, it is necessary not to touch anything with the trigger settings, and simply click on the button retain. From you will be asked to authorize a new application, click on the button To accept. Then click on Run in the compose window of the script.
6. Restart your Gmail page and then you will see the list of shortcuts in a new name - Remove later (Or any other name you specify). When viewing emails can simply assign them to the label, and they will be automatically deleted after the scheduled time.
Your use of the script can be created as a semi-automatic, meaning you can manually assign a shortcut to the deferred removal, and is completely independent. To do this you will need to create a filtering rule by which certain messages will be marked with that label.