Integrate Google Docs with Salesforce for Net Zero Cloud
Author disclosure reports directly in Google Docs by using the Salesforce Disclosure and Compliance Hub Connector add-on. To establish a secure connection between Salesforce and the add-in, configure a Google Developer client, authentication provider, and named credential.
Required Editions
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
Before you begin the integration of Google Docs with Salesforce for Net Zero Cloud:
- Log in to Google.
- Create a Google Developer account.
Salesforce Disclosure and Compliance Hub Connector add-on supports the Android, Microsoft Windows, and iOS operating systems, and the latest stable browser versions of Apple Safari, Mozilla Firefox, and Google Chrome.
See Supported Browsers and Devices for Salesforce Contracts Connector for Word Add-In. The article is written for Salesforce Contracts users, but the steps apply to Net Zero Cloud.
- Establish a connection between Salesforce and Google by configuring a Google Client app.
- Establish a secure connection between Salesforce and Google by adding an authentication provider credential.
- Add a named credential to use the external document storage configuration.
- For legacy named credentials that use per-user authentication, grant access to users through permission sets and profiles.
- To generate disclosure reports with the Salesforce Disclosure and Compliance Hub add-on for Google Docs, select Google Docs for Get Disclosure and Compliance Hub Plugin.
Create a Connection Between Salesforce and Google
Configure a Google Client app to establish a connection between Salesforce and Google.
Required Editions
| User Permissions Needed | |
|---|---|
| To register a client application on Google: | Google access |
- Open Google Console, and log in to your Google account.
- Search for app registration, and then click NEW PROJECT.
-
Enter the registration details.
- Enter a name for the app, for example, Google Client.
- Click Create.
-
From the project creation notification, select the project that you created.
- From API & Services, select Enabled APIs & services.
- Click Enable APIs and services.
- Search for and enable Google Drive API and Google Docs API.
-
Add and save credentials.
- Click Credentials.
- Click CREATE CREDENTIALS and select OAuth client ID.
- Click CONFIGURE CONSENT SCREEN.
- Select Internal and click CREATE.
- On the OAuth consent screen tab, enter the app information.
- On the Scopes tab, click ADD OR REMOVE SCOPES.
- Select openid, email, profile, and Google Drive API https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/documents.currentonly
- Save your changes.
-
Save your client information.
- Click Credentials.
- From the OAuth 2.0 Client IDs section, download the credentials of the client you created.
-
Copy and save the Google client ID and Google client secret values.
You need these values when you configure your authentication provider. If you don’t copy the client secret value now, you can’t retrieve it, and must create a new one.
Configure an Authentication Provider for Google Client App
Add an authentication provider credential to establish a secure connection between Salesforce and Google.
Required Editions
| User Permissions Needed | |
|---|---|
| To view the settings: | View Setup and Configuration |
| To edit the settings: | Customize Application |
| To configure Auth. Provider: | Manage Auth. Providers |
- From Setup, in the Quick Find box, enter Auth. Providers, and then select Auth. Providers.
- Click New.
- For the provider type, select Open ID Connect.
- For the authentication provider name, enter Google App.
- For the consumer key, enter your Google client ID.
- For the consumer secret, enter your Google client secret value.
- For the authorize endpoint URL, enter https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force.
- For the token endpoint URL, enter https://oauth2.googleapis.com/token.
- For the user info endpoint URL, enter https://www.googleapis.com/oauth2/v1/userinfo.
-
For the default scopes, enter openid email profile
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/documents.currentonly.
Make sure that Default Scopes matches the API permissions that you added to your Google account. See Create a Connection Between Salesforce and Google.
- Deselect Send client credentials in header.
- Select Send access token in header and Include Consumer Secret in SOAP API Responses.
- For the registration handler, select Automatically create a registration handler template.
- For how to execute the registration, select your system admin account.
- Save your changes.
-
Under Salesforce Configurations, verify that these URLs are generated.
- Test-Only Initialization URL
- Single Sign-On Initialization URL
- Existing User Linking URL
- OAuth-Only Initialization URL
- Callback URL
- Single Logout URL
-
If your Salesforce org has an Experience Cloud site, expand Experience Cloud Sites and
verify that these URLs are generated.
- Test-Only Initialization URL
- Single Sign-On Initialization URL
- Existing User Linking URL
- OAuth-Only Initialization URL
- Callback URL
-
Save your changes.
After you save the Auth. Provider, a Registration Handler Apex class is created. For example, AutocreatedRegHandler1234567890123.
-
Disable email notifications.
You can also disable email notifications when you link your Salesforce account with your Google account and update the Salesforce email address with your Google account.
- Click the Registration Handler Apex class link.
- Click Edit.
-
Search for the updateUser method, and remove or comment out this entry.
//u.email = data.email;//u.lastName = data.lastName;//u.firstName = data.firstName; - Save your changes.
-
Add the Callback URL.
- Go back to your authentication provider.
- In the Salesforce Configuration section, copy the callback URL.
- Open your Google Client account, and click Credentials.
- Paste the redirect URI in URIs and save your changes.
- If you have a partner community set up, go to the Auth. Provider in your org.
- From the Experience Cloud Sites section, copy the redirect URI.
- Open your Google Client account, and click Credentials.
- Click ADD URI.
- Paste the Experience Cloud Site redirect URI, and save your changes.
-
Test the Auth. Provider authentication.
- From the Salesforce Configuration section, copy the Test-Only Initialization URL.
- Paste the URL in the address bar, and press Enter.
Log in to the third-party provider and you’re redirected back to your Salesforce org.
Create a Named Credential for Google Client App
Add a named credential to use the external document storage configuration. Specify the Google Drive location in the external document storage configuration so that the generated contract documents and document templates are stored in a single location.
Required Editions
| User Permissions Needed | |
|---|---|
| To view named credentials: | View Setup and Configuration |
| To create, edit, or delete named credentials: | Customize Application |
| To authenticate on Google Console: | Google access |
- From Setup, in the Quick Find box, enter Named Credentials, and then select Named Credentials.
- From the actions menu, select New Legacy.
- For Label, enter GoogleClient.
- For URL, enter https://www.googleapis.com.
- For Identity Type, select Per User.
- For Authentication Protocol, select OAuth 2.0.
- For Authentication Provider, select the authentication provider.
- Select Start Authentication Flow on Save.
- Select Generate Authorization Header.
-
Save your changes.
The named credential’s authentication status changes to Authenticated when the Google account is authenticated.
Note If your Google account is already authenticated in your current browser session, you can successfully authenticate your named credential. If it isn't, authenticate your named credential by using your Google account credentials.

