/

/

How To Set Up Salesforce Files Connect for Google Drive

Salesforce Files Connect for Google Drive allows specified users to add Google Drive files to the Files section or a Lightning Page component of any record.

The Salesforce Files tab will show Google Drive as a Connected Source. A custom tab called Google Drive can be created. This tab can have list views like any other tab.

Google Drive Files on Lightning Page Component

Setting up Files Connect for Google Drive requires administrative access to both Salesforce and the Google Cloud Platform console (the same admin login as Google Workspace).

The same username should be used for logging into both. This may mean temporarily making a Google Workspace admin a Salesforce System Administrator or vice versa.

While the following may seem like a lot of steps, the ability to set up secure server-to-server integration in about 30 minutes represents a small sliver of time compared to setting up other types of system integrations.

đź“ť Cloud vendors frequently make changes to their user interfaces, so what you see in Salesforce and the Google Cloud Platform console may not precisely match all the screenshots below.

⚠️ Access to Shared drives is not officially supported.

Salesforce Files Connect Setup

In Salesforce Setup, search for the words files connect. Click on the Files Connect result.

Search for Files Connect

Enable Files Connect with the following settings:

Files Connect Settings

Salesforce Permission Set Setup

In Salesforce Setup, search on the word permission. Click Permission Sets.

Salesforce Search Permission Sets

Create a new permission set named Files Connect. Leave the License field value as None.

Files Connect Permission Set

In the Permission Set, select System Permissions. Click the Edit button.

Files Connect System Permissions

Check the Files Connect Cloud checkbox and then save.

Files Cloud Connect System Permission

Assign the permission set to users:

Assign Files Connect Permission Set

Salesforce Auth. Providers Setup

In Setup, search on the word auth. Click on the Auth. Providers result.

Salesforce Setup Search: Auth. Providers

Create a new Auth. Provider.

In the Provider Type field, select Open ID Connect. In the Name field, enter Google Drive. Add placeholder values to the four required files shown below. Click Save.

Salesforce Create New Auth. Provider

After saving, a Callback URL will be assigned in the Salesforce Configuration section.

Salesforce New Auth. Provider Callback URL

Copy/paste the Callback URL into a text editor.

Callback URL Text Editor

Google Cloud Platform Setup

In Google Cloud Platform, click on Select a project (or an existing project name) and then click New Project.

GCP Create New Project

Name the project Files Connect Google Drive.

GCP - New Files Connect Project

Search for and select the Google Drive API.

GCP - Search For Google Drive API

Click the Enable button to enable the Google Drive API.

GCP - Enable Google Drive API

While still in the Files Connect Google Drive project, click the Create Credentials button.

GCP Project - Create Credentials

Select OAuth client ID.

GCP - Create Credentials

Click the Configure consent screen button.

In the consent screen, under Application Type, select Internal. Give the application a name, such as Files Connect for Google Drive.

GCP - OAuth Credentials

Under Authorized domains, add salesforce.com. Click Save.

GCP - Authorized Domains

Select Web Application. In the Name field, enter Salesforce. Paste the callback URL from your text editor into the Authorized redirect URIs section. Click the Create button.

GCP - Creat OAuth Client ID

A client ID and client secret will be created.

GCP OAuth ID Client Secret

Copy the client ID and paste it into the Consumer Key field of the Auth. Provider Edit screen. Copy the client secret and paste it into the Consumer Secret field.

Salesforce Auth. Provider URLs

Copy and paste the following URLs into the corresponding fields in the Auth. Provider Edit screen (above).

Authorize Endpoint URL: https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force
Token Endpoint URL: https://accounts.google.com/o/oauth2/token
User Info Endpoint URL: https://www.googleapis.com/oauth2/v3/userinfo
Default Scopes: openid email profile https://www.googleapis.com/auth/drive

Salesforce External Data Source Setup

In Setup, search on the words external data. Click External Data Sources.

Salesforce Setup - Search on External Data

Create a new External Data Source.

Salesforce New External Data Source

In the New External Data Source Screen, enter the following values:

External Data Source: Google Drive
Name: Google_Drive
Type: Files Connect: Google Drive
Authentication Provider: Google Drive

Leave the default values in the other fields.

Salesforce Google Drive External Data Source

Click the Save button. You will be taken to the Google Workspace sign-in screen. Select your Google Workspace account and enter your password if prompted.

Sign In With Google

After logging into your Google Workspace account, you will be returned to External Data Sources and will see your Google Workspace username in the Administration Authentication Status field.

External Data Sources Validate Sync

Go back to the Files Connect permission set and add the External Data Source you created earlier to the right-hand Enabled External Data Sources column.

Files Connect Permission Set External

Salesforce External Object Setup

In the External Data Source for Google Drive, click on the Validate and Sync button. This will synchronize the Google Drive schema to Salesforce. Don’t worry, it will not synchronize files into Salesforce.

An External Object will be created and the bottom section will appear.

External Data Sources External Object

Click the Edit link under Action. In the edit screen, give the Google Drive external object a user-friendly label such as “Google Drive”.

Salesforce External Object Google Drive

Salesforce Google Drive Tab Setup

In Setup, search on the word tabs. Click Tabs.

Salesforce Setup Search Tabs

Click the New button.

Salesforce New Custom Tab

In the Object picklist, select Google Drive. Select a tab style or upload your own icon.

Salesforce Custom Tab Object Style

Complete the setup by assigning the tab to the appropriate Profiles.

Users will now be able to add Google Drive files to Salesforce Files. They will also be able to create list views of Google Drive files in the Google Drive tab.

Your CRM Decision. Our Experience.

Project guidance from an independent consultant

Your CRM Project