people-api

Convert Contact URL to Resource Name for People API using Google Apps Script

Gists This is a sample script for converting a contact URL of “person/c###” to a resource name “people/c###” for People API using Google Apps Script. When you open each contact at Contacts with your browser, you can see the URL like https://contacts.google.com/person/c###################. Here, you might have a situation where you are required to retrieve the resource name for People API from this URL. But, in the current stage, person/c################### cannot be directly used as the resource name people/c###################.

Using getBatchGet, batchCreateContacts, batchDeleteContacts, batchUpdateContacts of People API with Google Apps Script

Gists These are the sample scripts for using getBatchGet, batchUpdateContacts, batchDeleteContacts, batchCreateContacts of People API with Google Apps Script. When the data is retrieved and put with People API, the process cost can be reduced by using batch requests. Fortunately, in the current stage, People API has native methods for using batch requests. Those are getBatchGet, batchCreateContacts, batchDeleteContacts, and batchUpdateContacts. In this post, I would like to introduce the sample scripts for using the batch requests of People API.