November 12, 2023
How to Integrate Salesforce and Google Drive
The world revolves around data, which necessitates its collection, processing, storage, and safeguarding. Contemporary CRM platforms like Salesforce, Dynamics, Zoho CRM, and others offer prime opportunities for gathering, processing, and securing customer-related data.
Nonetheless, CRM users often encounter limitations regarding storage capacity, compelling them to incur extra charges for additional space or engage in manual data management, involving deletion or data relocation. This is where storage services come into play.
The challenge lies in the separation of storage services from CRM tools, necessitating users to contemplate data transfer from the CRM to the storage service. Fortunately, the Salesforce CRM platform facilitates seamless integration with file storage services like Google Drive.
This article elucidates methods to circumvent manual data transfers and avoid extra expenses. It provides insights into connecting Salesforce with Google Drive.
What is Salesforce?
Salesforce is a global platform that offers customer relationship management services for functions such as Sales, Marketing, Customer Support, and more. In addition to CRM services, Salesforce extends further opportunities to its global user base, including app creation, data integration from other systems, data visualization, and educational resources.
What is Google Drive?
Google Drive is a user-friendly service that allows individuals worldwide to securely store their files on Google’s cloud servers. It supports the storage of files of various types and sizes, facilitates automatic file synchronization across devices, and offers integration with other Google tools.
Benefits of Google Drive Salesforce Integration
While working within Salesforce, users frequently create and manipulate files, including event photos, product images, screenshots, and attachments. Salesforce accommodates various file formats, including audio, video, images, and archives. These files need a storage location accessible directly from Salesforce. Integration between Salesforce and Google Drive enables Salesforce users to store their files, synchronize them across devices, and share them with other users or teams.
By connecting Salesforce with Google Drive, users can avoid the need for additional Salesforce storage extensions and the hassle of clearing space in Salesforce’s native storage.
Need to set up Salesforce Files Connect for Google Drive file linking? We’ll walk you through the process, but we’re not going to lie to you – it’s going to take a while. So before we jump into things, let’s go over a few limitations of Files Connect.
Salesforce Files Connect/Google Drive Limitations
- Salesforce Files Connect doesn’t work with Google Shared Drives. You can use it to view and share individual files that have been shared with you, but you can not access Google Shared Drives with Salesforce Files Connect.
- Edits made to files stored via Copy in Salesforce will not update the original file in Google Drive.
- Files Connect doesn’t support uploads to Google Drive from within Salesforce. To add a file to your Drive tab in Salesforce, you’ll need to do it from Google Drive.
If any of these are dealbreakers for your organization, spare yourself the wasted afternoon and consider a different solution.
Enabling Files Connect
First, you’ll need to enable Files Connect for your org. In Setup, go to the Quick Find bar and search for Files Connect.
In Files Connect Settings, click Edit and select Enable Files Connect. Next, select an option from the File Sharing picklist.
You’ve got two choices here: select Copy to make a copy of your external files in your Salesforce org, or choose Reference to simply add a link to the external files from Salesforce.
- Copy files will behave like native Salesforce documents – you’ll be able to preview and share them with external collaborators without having to worry about their access to your Google Drive environment.
- Reference files won’t be available for preview within Salesforce, and users will need access to the file via Drive in order to view it. This is the better option for organizations that wish to maintain their Google Drive security settings across all modes of access.
Creating an Authentication Provider for Google Drive
In order to use Google Drive as an external data source for Files Connect, you’ll need to create an authentication provider in Salesforce.
First, head over to the Google Developers Console and create a new project. Search for Create a Project in the global search bar and select the first result.
Give your project a name and select Create to get started.
From the global search bar in your project dashboard, find and select Google Drive API. Click Enable API to activate it for use with your project.
Navigate to Credentials in the Google Drive API dashboard and click Configure Consent Screen. This is the interface your users will use to connect their Salesforce orgs with their Google Drive accounts.
Enter an app name – “Files Connect” works nicely – and a valid email address for the User Support Email and Developer Contact fields. You don’t need to complete the rest of the app registration wizard to get up and running with Files Connect; go ahead and click through it.
Return to the Credentials tab, click Create Credentials, and select OAuth client ID.
From there, select Web Application, give your application a name, and click Create. You’ll return to this tab later to complete setup of your authentication provider.
Take note of the credentials you’ve just created and head back over to Setup in your Salesforce org. Find Auth. Providers with the Quick Find bar and select New.
Give your new Authorization Provider the following settings:
Provider Type: Open ID Connect
Name/URL Suffix: Your choice – whatever you choose will be visible to users.
Consumer Key: The Google OAuth Client ID you just created
Consumer Secret: The Google OAuth Client Secret you just created
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
Default Scopes: openid email profile https://www.googleapis.com/auth/drive
Click Save and find the Callback URL that appears at the bottom of your new Authorization Provider’s detail page. Copy the URL and return to your project in the Google Developer Console.
In the Credentials tab, click on the app you created under OAuth 2.0 Client IDs and add your Callback URL to the Authorized Redirect URIs section of its detail page. Click Save.
Defining Google Drive as an External Data Source
In order for Drive files to show up in your Files tab, you’ll need to define Google Drive as an external data source in your Salesforce org. Find External Data Sources in the Quick Find bar and select New External Data Source.
Give your new external data source the following settings:
External Data Source/Name: Again, this is your choice – it’ll be visible to users, so choose something simple and useful. We went with “Google Drive.”
Type: Files Connect: Google Drive
Identity Type: Per User
Authentication Protocol: OAuth 2.0
Authentication Provider: The Authentication Provider you created in the previous step
If you’re interested in testing your user authentication experience, select the Start Authentication Flow on Save checkbox. This will take you through the same Google OAuth process individual users will complete to connect to their Google Drive accounts.
Managing User Permissions for Salesforce Files Connect
As with most Salesforce tools, user access to Files Connect can be managed via both Profiles and Permission Sets. We’ll walk you through both options.
Managing Files Connect Access with Permission Sets
To grant access to Files Connect via Permission Sets, find Permission Sets in the Quick Find bar. Click New to create a new permission set for Files Connect users, or select an existing permission set to upgrade with Files Connect access.
To manage Files Connect permissions, scroll all the way to the bottom of your selected permission set’s detail page and select System Permissions.
Click Edit and find Files Connect Cloud in the list of system permissions. Select it and click Save.
Return to your permission set’s detail page and select External Data Source Access in the Apps section of the page.
Click the Edit button to select from your org’s available external data sources.
Select the external data source you just created and click the Add button to enable it for use with this permission set. If you don’t see your external data source on this screen, you may need to go back and check your work in previous steps. When you’re done, click Save.
Finally, click Manage Assignments on your permission set’s detail page to grant access to the appropriate users.
Managing Files Connect Access with Profiles
Managing Files Connect access with Profiles is a similar process. Find Profiles in the Quick Find bar and either create a new profile or, more likely, select an existing one to add Files Connect access to.
Click Edit next to your selected profile and scroll down to the Administrative Permissions section of its settings panel. Select Files Connect Cloud and click Save.
At the top of your profile detail page, select Enabled External Data Source Access and click Edit to select from your org’s available external data sources.
Choose the external data source you just created and click the Add button to enable it for use with this profile. Click Save to complete the process.
System administrators can assign this profile to users by editing their individual user settings.
Connecting to Google Drive from Salesforce Files
Head over to the Files tab in your Salesforce org. If you’ve done everything right, Google Drive will appear under Connected Sources in the Files navigation sidebar. At this point, Salesforce will prompt you to connect to your Google Drive account.
If you’ve ever signed in to a third-party website with your Google account, this process will look very familiar. Select your account and click Allow to grant Salesforce access to your Google Drive files.
When you’re done, your Drive files will appear alongside your existing Salesforce files under Google Drive in the Files tab.
These files will behave like native Salesforce files, so you’ll be able to view, share, and search for them the way you would with any other Salesforce document.
If you’re actually using this guide to set up Files Connect, pat yourself on the back – you’re all done! But if you’re just trying to figure out how hard it’ll be to get things up and running, you may be wondering whether all this is worth it. Again, let’s review some of the limitations of Files Connect for Google Drive users:
- No compatibility with Shared Drives – Files Connect does not allow you to access files stored in Shared Drives
- Lack of consistency with the Google Drive environment – Google Drive files stored in Salesforce via Copy have a life of their own, with different security settings than the originals that live in Drive.
- No ability to add files to Google Drive from within Salesforce – If you want to add a new item to your Drive files stored in Salesforce, you’ll need to head over to Google.
For many organizations, these limitations won’t be a major hurdle, and Files Connect will work just fine. But if all your business documents live in Google Drive, and particularly if your organization is dependent on Shared Drives for collaboration, Files Connect may not be the tool best suited to your needs.
–Written by Meshach Dimka
Embark on a transformative journey in redefining your marketing success by revolutionizing your approach to Salesforce Campaign Management. Utilizing Salesforce’s remarkable features and data-driven insights, businesses of all sizes can create personalized, engaging campaigns. Whether you operate a small business or a large corporation, Salesforce Campaign Management provides the scalability and tools necessary to establish digital dominance. To delve into this transformative potential, reach out to DKLOUD at bam@dkloudconsulting.com or enquiries@dkloudconsulting.com.
Take your marketing to new heights with Salesforce Campaign Management and DKLOUD today!