Introduction
S-Docs connects seamlessly with Google Drive, meaning that you can generate documents securely on the Salesforce platform and then upload them to Google Drive right away -- all without ever leaving Salesforce. This article will provide you with step-by-step instructions for configuring the S-Docs and Google Drive integration.
The S-Docs package already includes all needed components that allow it to work with Google Drive. However, your admin will need to complete the following steps to enable the feature.
Step 1: Add Remote Site Settings
The S-Docs Google Drive Integration requires that you create two entries in Salesforce’s Remote Site Settings that will allow your Salesforce org to interface with Google.
From the Setup menu, navigate to Remote Site Settings by typing "Remote Site Settings" into the Quick Find bar, then click Remote Site Settings in the dropdown menu. Click New Remote Site.
Enter the following values:
Remote Site Name: SDOCS1
Remote Site URL: https://accounts.google.com
Make sure Active is checked, and then click Save & New.
For the next site, enter the following values:
Remote Site Name: SDOCS2
Remote Site URL: https://www.googleapis.com
Make sure Active is checked and then click Save.
Step 2: Notify S-Docs Support of API Request Domains
For the S-Docs and Google Drive integration to function properly, S-Docs needs to whitelist the domains that your API requests will be coming from. Please email support@sdocs.com with the following two domains:
1. Your org's domain
To find your domain in Lightning, click your user profile in the upper right corner and copy it from under your username. Make sure to add "https://" at the beginning.
To find your domain in Classic, navigate to the Home screen and copy it from your browser's URL bar up to the first forward slash.
2. Your Google Drive Redirect URI
To find your Google Drive Redirect URI, you need to attempt to authorize S-Docs to upload documents to Google Drive.
Navigate to the S-Docs Setup page by clicking the App Launcher in the upper left corner, typing "S-Docs" into the search field, then clicking S-Docs Setup.
Scroll down to the Other Pages section and click Go To Google Drive Integration Page.
On the next page, click Authorize Google Drive Access.
Then, copy the Redirect URI up to the first forward slash.
Email the two URLs from this step to support@sdocs.com. S-Docs will whitelist your domains so that you can get started using Google Drive with S-Docs.
Step 3: Add Google Docs Enabled Checkbox to Template Detail Page & Activate Templates for Google Drive
Administrators are able to determine which documents are eligible for upload to Google Drive with the Google Docs Enabled checkbox. This checkbox is not visible by default, however, and must be added to the template detail page layout.
From the Setup menu, navigate to the Object Manager and find the SDoc Template object.
Navigate to the Page Layouts tab, click the dropdown arrow for the SDoc Template page layout, and click Edit.
Navigate to the Fields tab, find the Google Docs Enabled field, and drag it down into the SDoc Template Detail section. Click Save.
This checkbox will now appear on all template detail records. You can now check it to determine whether new documents generated with this template can be uploaded to Google.
For more information on generating and uploading S-Docs documents to Google Drive, please review our guide Using Google Drive.
Step 4 (Optional): Specify A Google Drive Folder
By default, all S-Docs uploaded to Google Drive will be stored in the user's base Google Drive folder. You can specify a different folder to upload your document to at the template level.
If your template is Google Docs enabled, the Document Options tab in the template editor will contain additional Google Drive options where this can be configured.
[1] To specify which folder documents generated using this template should be stored within, paste the folder ID into this field.
[2] Check this box to upload your document to Google Drive in its native format. By default, all documents uploaded will be converted to Google Docs. This checkbox will cause a PDF to upload as a PDF instead of a Google Doc.
Tags: Integrations