Building a Gmail Contact search application

Now, we will create an application to search existing contacts. This application is able to search and list your Gmail Contacts in Sheets. Create a new Sheet and rename Sheet1 to Contacts and set it up as shown in the following screenshot. Create a button and assign the function name searchContacts to it, as you learned in the previous chapter.

Building a Gmail Contact search application

Create the searchContacts function as listed here:

function searchContacts(){ var SheetContacts = SpreadsheetApp.getActiveSpreadsheet() .getSheetByName("Contacts"); // Read input from cell A3 var searchCriteria = SheetContacts.getRange("A3").getValue(); // First 10 ...

Get Learning Google Apps Script 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.