Intro
This article explains how to create Google OAuth 2.0 credentials for the Google Drive API and use them to connect Google Drive to Domo Documents. If you have an Enterprise Account, the steps may vary. If you already have a Google Drive Client ID and Client Secret, skip to Create a Google Drive Connection.Note: If you change the
scopes of your OAuth client, you must re-authenticate your Google Drive connector.Required Grants
To access Documents, the following grants must be enabled for your role:- Manage Documents — View, edit, and delete any Document Collections in this instance.
- Edit Documents — Create and edit Document Collections to which you have access.
- View Documents — View only for any Document Collections to which you have access.
Create a Project and Enable the Google Drive API
To get a Google Drive Client ID and Client Secret, generate them through the Google Cloud Console by enabling the Drive API and creating OAuth 2.0 credentials.- Open the Google Cloud Console.

- Log in with your Google account, then select Create Project (or select an existing one).


- Select your new project.



- In the top search bar, type Google Drive API and select it from the list.


- Select Enable to enable the Google Drive API.

- After enabling the API, select Create Credentials.

- Select User Data to create an OAuth client.

- Set the OAuth credentials name, support email, and developer contact.

- Set scopes by selecting Add or Remove Scopes.

Note: If you add sensitive or restricted scopes, such as scopes that let you access a user’s emails or contacts, you must submit your app for verification.
- Filter by Google Drive API and select the three non-restricted scopes, then select Update.
There are two options when adding scopes:
- Filter to the Google Drive API, add all 17 scopes, then remove the sensitive and restricted scopes in the next step (unless you plan to submit your app for verification).
- Scan the list of 17 scopes and select the three from the table above.

- Scroll to the bottom of the setup wizard and select Save and Continue.

- Set the name and type of the OAuth client.

- Set the authorized redirect URIs:
https://oauth.domo.com/api/data/v1/oauth/providers/google-drive-oauth-enterprise/exchangehttps://oauth.domo.com/api/data/v1/oauth/providers/google-drive-oauth-enterprise/exchange?flowName=GeneralOAuthFlow

- Select Create to finish creating the OAuth client.

- A pop-up displays your Client ID and Client Secret. Copy them directly or select Download JSON to save them to a file. Download your Client ID and select Done.


- Navigate to Audience. Under Publishing Status, publish your app.

Create a Google Drive Connection
- Navigate to Domo Documents.

- Select Create Collection, then select Connectors.

- Select Google Drive.

- Select an existing Google Drive account or create a new one.

- Select the Google Drive OAuth Enterprise connector.

- Enter your Client ID and Client Secret from when you created your Google Drive OAuth client.

- Select the appropriate Google account.

- If this is your personal Google Drive and your OAuth app is not fully verified (Testing Mode), select Advanced and continue to domo.com.

- Allow Domo to have access to Google.

- Select all access privileges and select Continue.

- Select Next, then select the content you want to load from Google Drive.

- Type
rootfor root directory, or enter the Drive ID.


- Set the update schedule.

- Set the name and description of this Document Collection, then select Save.

- Allow time for the Collection to load files. Select the Files tab to view a listing of the referenced files, or select the Overview tab to enable Agent Knowledge.
