Automating a complete workflow

Now that we have discovered the most important methods available (not all of them, that's what the documentation is for), we can try and get our hands on the workflow that we suggested in the introductory example.

Just a reminder of that example is as follows:

You want to set up a filter that sets a label on every message coming from your boss, but you also want to keep an archive of it in a document along with a link to the attachments stored in your drive to be able to quickly search any reference he might have sent you. You would prefer that his e-mail messages remain in your main mailbox the whole day to be sure that you don't forget to read them.

I'm warning you, this code is a bit long.

When I imagined the example ...

Get Google Apps Script for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.