Is this for me ?
This article is for you if :- Your workplace uses Zoho People for saving employee contacts.
- You have Google account (work/personal doesn't matter).
- You want your Zoho contacts to show up in your google contacts so that you can access them on you Android/iPhone/Gmail or other clients.
Why do we need it ?
Unlike Zoho CRM, Zoho-people does not have any option for synchronizing Zoho contacts to your google contacts. So I used Google Contacts API and Zoho REST API to sync the contacts.
Prerequisite :
- Obviously you should have Zoho People access .
- Google account.
- A contacts group with a relevant name. Lets call it YOUR_COMPANY_NAME.
- Authentication token from Zoho people. Lets call it YOUR_ZOHO_AUTH_TOKEN. At the time of writing this article, I could generate the token using this link. You should be logged in to Zoho people before using above URL. It will give you authtoken something like
- A copy of this Google App Script . This script will update/create Zoho contacts, which were added or modified in last 24 hours, in your Google account. Create a copy of this script by going to File => Make a Copy. You will be able to access this script anytime in your google drive.
Action Time !!
- Open the google app script and put appropriate values for YOUR_COMPANY_NAME and YOUR_ZOHO_AUTH_TOKEN.

- Now you have to select a function named "syncContacts" to run from the script to test that it is working. After selecting the function, click on the Run/Play icon. Refer this image.

- When you click Run/Play icon, you will be asked to authorize the script to run. Click "Review Permissions" and then "Allow" to proceed.
- You will now see that function syncContacts is running.

- After execution go to View-->Logs to check if there are any errors. If the above steps are done correctly, most likely you wont see any error.
- Once the execution finishes, you should see Zoho contacts in your new google contacts group.
- If there is any problem you can add a comment and I will respond when I get time.
Let it run on its own
Obviously we would not want to run it manually every time.
- From the script editor, choose Resources > Current project's triggers.
- Click the link that says: No triggers set up. Click here to add one now.
- Under Run, select syncContacts function.
- Under Events, select either Time-driven .
- Select and configure the type of trigger you want to create. Recommended trigger can be seen here

- Optionally, click Notifications to configure how and when you will be contacted by email if your triggered function fails.
- Click Save.
There is a lot that can be done to improve this script but I did it till the extent I felt necessary. Feel free to modify your copy as per your needs. If it works for you please add comment as Verified and if it does not then you can add the problem you are facing. This will help others to confidently use it.
Verified!!
ReplyDelete