Salesforce Integration with Google Drive
Lightning Connect provides access to the files stored outside of your Salesforce Organization, and enables seamless integration with the Force.com platform. External data is not stored directly in the Salesforce, but the Lightning components read the data from the external system using the external data source and access the data on demand in real time.
Under Build section, navigate to Customize → Salesforce Files → Settings → Files Connect and Enable the Files Connect option as shown in the below picture.
Create the Permission Set with the permission (In the System Permissions section) shown below and assign it to yourself, and also assign to the users who need to access the Google Drive.
Go to https://console.developers.google.com and create a Web application project with Drive APIpermission.
And generate the Client ID and Client Secret Key.
Under Administer section, navigate to Security Controls → AuthAuth Providers, and select the Provider Types as Open Id Connect, and enter the details as shown below. Once saved, copy and paste the generated Callback URL to the Redirect URIs in your Google Web Application.
Under Build section, navigate to Develop → External Data Sources and Enter the details as showbelow (select the Type and Authentication provider as the provider which we created in the previous step, and check the Start Authentication Flow on Save check box).
Once you click the save button, you will be redirected to the authentication page; now, click the Accept button on that page.
Once you got authenticated by Google, click the Validate and Sync button and select the External data source we created in the previous step and click the Sync button.
Now, a new External object is created under the External Data source. Next, edit that object and select the deployment status as Deployed, and click Save.
Edit the Permission Set which we created in the
Step 2, and enable the External data source permission (In the External Data Source Access section).
Go to the Chatter and in the files section, you can see the new Data Source Section (Google Drive data source).
Click the Click here to check your credentials link for authenticating your Google drive. When you click this link, you will be redirected to the External Data Source page. Now, click the Save button and provide the access details on the authentication page.
Now, you can view all your files in the Google Drive in the chatter files section.
You can also share any file from your Google Drive with the Chatter group or a user.
Reference Link: Salesforce Files Connect