Vtiger Google Calendar Sync. How to install it

If you’re using Gmail to manage sales operations within your organization, we’ve a good news for you. Vtiger CRM offers a seamless way of syncing your calendar and contacts between Vtiger and Google.

The bad news is that if you have followed Vtiger Wiki about using the vtiger Google integration feature you may reach a dead block. And that’s because to enable the syncing in the open source version you need to do a few steps before that the actual wiki does not mention.

In this tutorial, I will show exactly how to enable you Vtiger-Google sync

How to enable Vtiger-Google Calendar Sync in 6.x and Vtiger 7

Step 1: Create a new Project in Google developer console

Before syncing your vtiger CRM with Google, you will need to get the API credentials from Google that will allow your users, to authenticate from you CRM.

Go to https://console.developers.google.com/project, log in with your Google Apps or Google account and click on the blue button “Create New Project.”

Vtiger Google Calendar Sync 1

You will be prompted to give this project a name. Just type in something that makes sense for you and click – Create

Vtiger Google Calendar2

Step 2: Set up the OAuth Screen and credentials

After creating the project, you need to select the project in the top bar and set the OAuth credentials and screens. Essentially, you will be setting how the Google authorization screen will look in your CRM, and the URL of your CRM so Google know if the connection from your URL should be trusted or not

Start by setting up the OAuth screen

Vtige Google-Calendar4

Create your project credentials

Vtiger Google Calendar 3

Please choose Web application, give it a name and add the origin and call backs according to:

  • Origin: Your crm url
  • Callbacks: Use the following URL. Remember to replace {SITE_URL} by your actual URL
    • Google Calendar Sync: http://{$site_URL}/index.php?module=Google&view=List&operation=sync&sourcemodule=Calendar&service=GoogleCalendar

    • Google Contacts Sync: http://{$site_URL}/index.php?module=Google&view=List&operation=sync&sourcemodule=Contacts&service=GoogleContacts

Vtiger-Google-Calendar5

 

Finally, save it and you will get your Client ID and Client Secret

Vtiger Google Calendar 6

Step 3: Update your CRM files

Now that you have your new Client ID and Client Secret. Open a the file located at modules/Google/connectors/Config.php and update the variables $clientId and $clientSecret

Vtiger Google Calendar sync

 

Only if you are using Vtiger 6.3

There is a known bug in vtiger 6.3 that even doing all this; you will see a blank page or fatal error. To solve this error, please download the files this GitHub repository or copy those from a vtiger 6.2 into the folder /modules/Google/handlers

Step 4: Follow Vtigers’ wiki

After the first three steps, you are ready to follow vtiger wiki entry to sync your calendar and contacts between vtiger and Google.

Done!

You have finally enabled the syncing between your CRM and Google calendar (or contacts) Now, each time you need to sync between the two services you will need to hit the sync now button in the calendar or contact list