Google Drive
Google Drive is a free and paid cloud-based storage and synchronization service developed by Google. It enables users to store and access files online and syncs stored documents, photos and more across all of the user's devices, including mobile devices, tablets and PCs.
In order to integrate Google Drive with Relyance AI you will need to first grant access to the Relyance Application in the Google workspace.
In some instances, you may need to grant permissions to the Relyance Google App. Please have your Google workspace admin configure the trust relationship as outlined here.
In your Google workspace (optional):
Our OAuth2.0 application needs to be trusted explicitly by the administrator of the Google workspace (our Google App Verification Request is in progress). You may need to involve the Google workspace administrator.


- Navigate to Security > API Controls in your Google Admin console Home page.
- Click on MANAGE THIRD-PARTY APP ACCESS.
- Click on Configure new app dropdown and select OAuth App Name Or Client ID.
- In the resulting screen, search for the following client ID (the Relyance AI client ID for Google Drive):
892114676652-slst0t12i39117d4qvdg8rm3sjlnldlf.apps.googleusercontent.com- The app should be displayed below.
- Click on Select.
- Check the Client ID to configure, and click on Select at the bottom.
- Select Trusted: Can access all Google services.
- Click on Confirm.
- Ensure the Access column for the Relyance AI app is Trusted.



In the Relyance AI application:

- Login to your Relyance account.
- Navigate to the Settings Menu in the bottom left-hand side.
- Select Integrations.
- Click on the Contract Integration tab.
- Find the Google Drive integration card and click it to open its connections.
- On the Authentication step, pick the method under Authentication Method.
- Select the storage type of the Google Drive you wish to integrate with (My Drive, Shared Folder, Shared Drive).
For My Drive or Shared Folder:
i. Enter the folder names you wish to scan. If you wish to integrate multiple folders, enter the folder names delimited by a semicolon(;) that documents will be downloaded from. Documents in subfolders of specified folders will also be downloaded. Example below:

Folder names are case-sensitive.
- Spaces are allowed.
- To download from the root folder enter a forward-slash ( /). For Shared Drive:
i. Enter the information of the shared drive as a JSON. Use the JSON editor.
ii. Enter the name of the shared drive as the value of shared_drive_name, and a comma-separated list of folder names as the value of folder_paths within braces.
For example, the screenshot below downloads documents from a shared drive named testdrive, and scans two folders folder1 and folder2/sub_folder.
iii. To download from multiple shared drives, create a separate JSON object for each shared drive.
Refer the screenshot below for an example. The second JSON object denotes that all documents starting from the root folder in anotherdrive are downloaded.
iv. Click Authenticate. to save your JSON configuration.
- Folder names are case-sensitive.
- Spaces are allowed.
- To download from the root folder enter a forward-slash ( / ).
- Click Authenticate.
- Sign into the account with document access and complete the Oauth flow by selecting Allow.
- At this point, you should see the following result on the Vendor Integrations page:
- Congratulations, you are now connected to Google Drive.


Which method to choose, and why connections drop
Google Drive offers four, and they differ in how the authorisation is held — which decides whether the connection keeps working:
| Method | Authorises as | Keeps working because |
|---|---|---|
| Domain Wide | a Workspace service account impersonating each user | delegation is granted org-wide in the Admin console; nothing to re-authorise |
| My Drive | the user who signed in | a stored refresh token |
| Shared Folder | the user who signed in | a stored refresh token |
| Shared Drive | the user who signed in | a stored refresh token |
Domain Wide is the recommended choice for anything organisation-wide. The other three depend on one person's refresh token, and Google invalidates those on password change, credential revocation, or when the account's session policy expires them — so those connections stop working through no change on either side and need re-authorising by that same person. Prefer Domain Wide unless the scope really is one user's own folders.
Domain Wide also needs Users Sampling Percent (what share of users to scan)
and takes an optional ;-delimited list of folders to exclude.
For Google Drive Domain Wide Delegation:
As a super admin of the Google Workspace, go to admin.google.com.
On the left navbar, click on Security. If you don't see "Security", click on Show more.
Then click on Access and data control.
Click on API Controls.
The last card for Domain wide delegation has a "MANAGE DOMAIN WIDE DELEGATION" button, click it.
Select Add new, next to API clients.
Enter the Client ID, as mentioned below:
- 110037688612688270977
For scopes, add these two, one at a time — they are the only scopes the integration requests:
https://www.googleapis.com/auth/drive.readonly— read file content and metadata.https://www.googleapis.com/auth/admin.directory.user.readonly— list the users whose Drive is in scope. Domain-wide delegation impersonates each user in turn, so without this there is nobody to impersonate.
Both are read-only. Relyance never requests
auth/driveor any other write-capable Drive or Directory scope, so the integration cannot modify or delete anything in Drive.Click Authorize to save.





In the Relyance AI application:
Login to your Relyance AI account.
Navigate to the Settings (bottom-left corner).
Select Integrations.
Search and locate the Google Drive integration card and click on it.
Click on the Add Connection button on the top right.
Provide a meaningful name for the integration and click on the Add button.

In the Overview section, select the integration features you wish to enable for the integration, review the Scope and Permission, and Endpoint details and click on Continue. For more details, seeIntegration Features.
In the Connection section, provide the appropriate values and click on Continue,
- Connection Name: This property allows you to update the integration specified in Step 6. If you have multiple integrations for the same vendor, you may want to assign distinct names to each. This helps streamline filtering by Discovery Source across the Inventory, Visual Maps, Assets, and Data Flow Analysis pages.
- Rescan Frequency: This property allows you to configure how often Relyance executes scans against this Vendor connection.
- Business Atlas Associations (required): the business entities or products that newly discovered third parties, services and assets from this integration are attributed to. Choose at least one from the Select Associations dropdown — the wizard will not advance past this step without one. For more details, see Business Atlas.

Select Domain Wide under Authentication.
- Enter your google workspace associated domain under Your Google Domain
- (OPTIONAL) Enter a list folder under List the folders you want to exclude from the scan, delimited by ;

This step applies only if the Data Inspection check box was enabled in Step 7. In the Data Inspection section, provide the appropriate values and click on Continue,
- Minimum Confidence Level: This property adjusts the sensitivity of the Data Inspection feature. Lower likelihoods (e.g., unlikely) offer more coverage but may produce false positives, while higher sensitivity (e.g., very likely) provides greater accuracy but less coverage.
- Sampling Percentage: This property adjusts the percentage of records using the table's row count (1000 records max) to return from a table.

Review the configuration summary from the Completion section and click on Finish.

Confirm the integration Status reflects Connected. Note:
As of today, only exact folder names, such as "Personal Folder" or "Other Folder," are verified by the platform. During the scanning process, it is checked whether any of these names appear in the excluded folders list. If they are listed, those folders are excluded. For instance, if two folders share the same name but are located in different paths, the specification of "Personal Folder" in the exclusion list results in both being excluded.
Check the connection after setup
Open the connection to see what Relyance is authorised for and what the last scan actually covered — a missing scope or a partial grant shows up here rather than as an error:

Authentication methods and fields
Pick one of these under Authentication Method on the connection wizard's Authentication step. This table is generated from the integration catalog, so it always matches what the form actually asks for.
| Method | Required | Optional |
|---|---|---|
| Domain Wide | Your Google Domain, Users Sampling Percent |
List the folders you want to exclude from the scan, delimited by ; |
| My Drive | My Drive folders containing Contracts delimited by ; |
— |
| Shared Folder | Shared folders containing Contracts delimited by ; |
— |
| Shared Drive | Shared Drive Folders (secret) |
— |
Manage this integration with Terraform
Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.
OAuth (browser authorization) — Domain Wide
The OAuth (browser authorization) — Domain Wide method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (terraform import relyance_integration_connection.example gdrive/<connection_id>) or reading it with the relyance_integration_connection data source.
OAuth (browser authorization) — My Drive
The OAuth (browser authorization) — My Drive method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (terraform import relyance_integration_connection.example gdrive/<connection_id>) or reading it with the relyance_integration_connection data source.
OAuth (browser authorization) — Shared Folder
The OAuth (browser authorization) — Shared Folder method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (terraform import relyance_integration_connection.example gdrive/<connection_id>) or reading it with the relyance_integration_connection data source.
OAuth (browser authorization) — Shared Drive
The OAuth (browser authorization) — Shared Drive method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (terraform import relyance_integration_connection.example gdrive/<connection_id>) or reading it with the relyance_integration_connection data source.