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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access