Prepare Your Google Drive Unstructured Data Connection
Before you connect Google Drive to Data 360, gather the required information and complete the preliminary setup in Google Console and Google Drive.
-
In the Google Cloud Console, turn on the Google Drive API.
-
In the Google Cloud Console, turn on the Google Drive Labels API. The connector reads Drive labels through this API and ingests them alongside your files.
-
Service accounts are Google identities used by applications to securely access Google APIs. For this connector, authentication is service account-based. With a service account, the connector can read files from Google Drive and access user information in your Google Workspace domain.
Note: You must use an admin account to complete these steps.
- Go to https://console.cloud.google.com/.
- Navigate to IAM & Admin Select.
- Click on Create service account.
- Enter a Service account name and click on Create and continue. This will create a service account in Google.
- To delegate permissions to the service account, go to Permissions.
- Select Manage access.
- Assign the Service Account Token Creator role.
- Save your changes.
- To create a key for the service account, go to Keys.
- Select Add Key.
- Click Create new key.
- Select JSON for the key type and click Create.
This will save a JSON file that contains client_email, scope, private_key, and token_url. You use these values to authorize users with the Google Drive connector.
Below is how the private key JSON file will look like:
Note: You can now use your service account for Agentforce use cases. To use this account to access data for multiple users, you must configure domain-wide delegation for the service account. If you want to ingest all shared or personal drives, configure domain-wide delegation. If you’re ingesting a specific shared drive ID, you can skip these steps.
Your service account is ready.
Grant the service account access to Drive labels in the Google Admin Console. Complete these steps with a Google Workspace admin account.
-
Sign in to the Google Admin Console and go to Rules & Settings > Labels.
-
Grant the service account permission to manage label access so it can read the labels catalogue.
-
For each label you want to ingest, open Edit label > Permissions and add the service account email address (
client_emailfrom the private key JSON).Note: Only labels explicitly shared with the service account are ingested. Labels not shared with the service account are omitted from ingestion, even if they are applied to files the connector can read. Labels can be applied only at the file level; folder-level labels are not supported.
- Ensure that you complete these steps using a Google account with access to the files and folders that you want to connect to Salesforce.
- To ingest unstructured data, find the shared drive or folder in Google Drive that contains the relevant files. Identify the drive ID at the end of the folder’s URL, such as https://drive.google.com/drive/folders/{drive_id}.
- If you’re ingesting a specific shared drive ID, verify that the admin account email used to create the connection has access to that drive.