Question

What is an efficient way to find recently updated Google contacts?

The obvious solution to retrieve all contacts with ContactsApp.getContacts() and iterate through all of them with getLastUpdated() doesn't seem particularly efficient and I am worried that such a code will exceed the time allowed if there are several thousand contacts.

Thanks.

Was it helpful?

Solution

You cant with ContactsApp. You can use urlFetch and use the raw contacts v3 api. Use a query using updated-min, remember what your last updated-min was so you only get ghe ones updated since your last call. See the api and this: https://developers.google.com/google-apps/contacts/v3/reference#Parameters

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top