Google Apps Script – Gmail A.P.I. – part 046.

In this tutorial, I will show you how to select only those that correspond to a list of email addresses from the list of emails received on a Gmail account.
Obviously, you can modify this script to perform other operations: delete them, assign them a label, …
Create a spreadsheet in Google Drive and from the main menu select: Extensions – Apps Script to create a new Google apps script.
In this script, you will have to enter this example source code and change the email addresses in the list:

In the editor on the left, you have a button: Services and you must choose the Gmail service.

Dupa ce ati salvat scriptul din meniul principal, veti putea rula functia: function getEmails.
You will be asked to authorize this operation and in the spreadsheet, you should have the result with the sorted emails.
Here is the result of running the script:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.