Relative Content

Tag Archive for google-apps-scriptgmail

Trying to clean old messages

I have 58,000 old emails in my Gmail account, and I think that I need to get rid of them. GAS is my best bet. I want to get all the emails that: 1) Are more than X days old, AND 2) Have no user labels, and move them all to trash. I know that Gmail will “choke” on thousands of messages, so I’d like to chew through the selected emails in batches of 100. I figured that I wouldn’t need to put logic in my script to create each batch, just return 100 through a limited query and run the script more frequently.

How do you test GMail Addon Permission changes?

Recently, we found out that we don’t need one set of permission scope for our gmail addon anymore. Because of this, I have deleted the said permission from my manifest and will be deleting it later in our google cloud listing.