Google Apps Script – custom google search engine – part 048.

This Google Apps Script can get a label email and parse the content with regular expressions.
In this case, it is an email sent by google and the script will search by the label “alerts” then the result is parsed with regular expressions to find a title and a description.
The primary condition is to add the email address googlealerts-noreply@google.com for the alerts to the label alerts. If you don’t have label alerts then create one and add that email address.
This source code is permissive, you can add any email address attached to a label and parse the body content.
This is the source code:

The result of the running source code is this:

This is an screenshot with the mail parsed by this source code:

Leave a Reply

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