O'Reilly logo

Going GAS by Bruce Mcpherson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Gmail, Calendar, and Contacts Apps

Microsoft Outlook is a single client management service equivalent to the combined Google services of Gmail, Calendar, and Contacts.

In Apps Script, each of these services is independent and callable from any of the Apps platforms (Sheets, Docs, etc.). This makes automation of common workflow tasks simple and common across apps.

At first, this might seem rather more complicated, but within the Outlook object model, each service is an independent object in any case, and doesn’t always follow the same paradigm.

Email Automation Exercise

The example in this chapter will bring together all these services into one workflow application implemented in VBA and in Apps Script. Although this is a fairly contrived example, it is designed to touch most of these services’ components, and integrates with a few others covered in this book. Furthermore, this type of email-oriented workflow is fairly common and should be easily adaptable across subject domains.

The final script will be fairly long, so will not be reproduced in full in this chapter. However, it is included in the accompanying GitHub code repository as gmailExample. Code snippets in both VBA and Apps Script will be shown together to contrast the different approaches.

The services and capabilities you’ll learn how to use during this exercise are listed in Table 8-1.

Table 8-1. Services and capabilities covered in this chapter
Service Capability Purpose
Gmail Searching threads ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required