Trigger to delete emails from account in GMail or other Email accounts.

John Davies
John Davies used Ask the Experts™
on
Hi,

Would anyone happen to know and have the instructions to set up the following.

We have meeting iPads that are used twice in a month for meetings. The users involved in these meetings also have access to a gmail account that is set up on each IPad to access documentation distributed to them. These email account need to be cleared on a 24 hour basis, so 24 hours after the meeting all content from gmail will be deleted (hopefully not manually, 56 of them).

The fact that the IPads are used twice a month does not warrant the license on our office365 tenant, so we created gmail accounts for them.

Now that the scenario is set, my question is, is there a way to create a trigger that will automatically delete ALL email from the Gmail account at a set time? If not, are there any alternative free email accounts that will allow me to do this?

Many Thanks in Advance

John
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
Are the email accounts being set up for the specific ipad?  If I have company email on office365 and then use the ipad in a meeting room or other location, I would log in to the webmail and access my email that way. Then log out when done.  Nothing gets saved on the ipad that way unless of course I forget to log out and "stay logged in" or use the remember feature.

Are you trying to delete the gmail account or the mail in a any specific gmail account?

Author

Commented:
Thanks for your response.

We are not using Office365 accounts with them due to license costs.

The Ipads are used in a meeting by one person and then in another meeting they could be used by another person, each Ipad has there own specific gmail account, IPAD1, IPAD2 and so on. As you can see Person 1 will use the ipad and then next month person 2 will use it and have access to the same ipad email account, reason for wanting to set up a task to delete all gmail email 24 hours after meeting and not having to login to 56 accounts manually.

Thanks

John
I can think of two ways to do it

1 .. setup a PC/Mac mail client and add ALL the 56 Gmail accounts to the one app. You leave all 56 accounts connected to the mail client which acts as a central mail clearance engine .. most good desktop based mail clients have unified inboxes and RULES where you can mark all READ mails > 1 day old and move to Trash

2. You can use Google Apps Scripts - and create a time filter where mail > 1 day is flagged and then deleted - covered in plenty of detail here
 http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script
The only hassle is you'll need to install the script on all 56 accounts once to get it working

Author

Commented:
Thanks for this, pointed me in the right direction.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial