Google Integration: General Availability for Lightning for Gmail and Lightning Sync – Part II


In Part I of the series, I discussed Lightning for Gmail – the email integration for Gmail users. In this blog (Part II) we’ll look at Lightning Sync for Google Applications.

Lightning Sync keeps contacts and events in sync between your Google applications and Salesforce.

When you sync contacts and events between your Google applications and Salesforce, you increase your productivity. That’s because there’s no need to duplicate work between the two applications. In addition, Lightning Sync syncs items whether you’re working from your desk or from your mobile device using Salesforce1.

Following are high-level steps to configure Lightning Sync in Salesforce:

Step 1: Prepare your G Suite account for Lightning Sync

The Google Administrator at your company can prepare Google servers to communicate with Salesforce. Your Google admin can complete these steps by logging in to your company’s Google API Console and Google Admin Console.

Using Google API Console

  1. Create a Google project dedicated to Lightning Sync. (
  2. From the new project, to set up reps to sync events, enable Google Calendar™ API.
  3. From the new project, to set up reps to sync contacts, enable Google Contacts API.
  4. Create credentials for a service account with the role Project Owner and the key type JSON.
  5. Enable Domain-Wide Delegation for the service account. Doing so generates a Client ID (also known as Client name) for the service account, which you need later.
  6. Save the JSON private key from your service account in a secure location and share it with your Salesforce admin (but only your Salesforce admin).

Using Google Admin Console

  1. Navigate to your security settings, select the advanced section, and click Manage API client access.
  2. Authorize read-only calendar scope for the service account by entering the service account Client ID (also known as Client name) you generated in Google API Console. Enter the scope:
    2. and

When you’re finished, Salesforce admins can take the next steps by preparing Salesforce for Lightning Sync.

Step 2: Prepare Salesforce for Lightning Sync

Lightning Sync, complete the necessary steps to prepare Salesforce, too.

  1. From Salesforce Setup, Register a new remote site for Don’t disable protocol security for the site, or Salesforce will not be able to connect with Google.
  2. From Salesforce Setup, enter Lightning Sync Setup in the Quick Find box, then select Lightning Sync Setup.
  3. Enable Lightning Sync.
  4. Select OAuth 2.0 for Google (Beta) as your preferred connection method.
  5. Upload the private key for your Google service account. Your Google admin generated the key when setting up the service account for Lightning Sync.
  6. Click Save.


When you’re finished, run the Lightning Sync connection test to make sure that you’ve setup your connection correctly.

After your Salesforce admin initiates contacts sync for you, Lightning Sync creates a group in Google Contacts called Salesforce Sync. Any contacts that have synced from Salesforce to Google are found in the Salesforce Sync group.

Gmail™ accesses those contacts automatically when you attempt to email or chat with those contacts. Or if you are set up to sync from Google Contacts to Salesforce, you can add Google Contacts to the Salesforce Sync group, and Lightning Sync starts syncing the contact with Salesforce during the next sync cycle.

Note: Don’t rename, move, or delete the Salesforce Sync group, or syncing between Salesforce and Google Contacts could stop.

Setting both Lightning for Gmail and Lightning Sync lets you choose which Google Calendar™ events sync to Salesforce. When you relate Google events to Salesforce using Lightning for Gmail, edits made in Google Calendar sync back to Salesforce, keeping important Salesforce events up to date automatically.

Table of Contents

Talk to our Salesforce Experts.