Skip to main content

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.
Learn more about grants.

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.
  1. Open the Google Cloud Console.
Google Cloud Console home
  1. Log in with your Google account, then select Create Project (or select an existing one).
Google Cloud project creation option
Google Cloud new project dialog
  1. Select your new project.
Google Cloud project selector
Google Cloud project dashboard
Google Cloud APIs and services
  1. In the top search bar, type Google Drive API and select it from the list.
Google Cloud search bar with Google Drive API query
Google Drive API search result
  1. Select Enable to enable the Google Drive API.
Google Drive API enable button
  1. After enabling the API, select Create Credentials.
Google Drive API credentials prompt
  1. Select User Data to create an OAuth client.
Google Cloud credentials type selection
  1. Set the OAuth credentials name, support email, and developer contact.
OAuth consent screen app information form
  1. Set scopes by selecting Add or Remove Scopes.
OAuth scopes configuration screen
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.
  1. Filter by Google Drive API and select the three non-restricted scopes, then select Update.
There are two options when adding scopes:
  1. 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).
  2. Scan the list of 17 scopes and select the three from the table above.
Google Drive API non-restricted scopes selected
  1. Scroll to the bottom of the setup wizard and select Save and Continue.
OAuth consent screen save and continue button
  1. Set the name and type of the OAuth client.
OAuth client name and type form
  1. Set the authorized redirect URIs:
  • https://oauth.domo.com/api/data/v1/oauth/providers/google-drive-oauth-enterprise/exchange
  • https://oauth.domo.com/api/data/v1/oauth/providers/google-drive-oauth-enterprise/exchange?flowName=GeneralOAuthFlow
OAuth client authorized redirect URIs
  1. Select Create to finish creating the OAuth client.
OAuth client creation confirmation
  1. 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.
OAuth client credentials pop-up
OAuth client credentials download screen
  1. Navigate to Audience. Under Publishing Status, publish your app.
OAuth consent screen audience and publishing status

Create a Google Drive Connection

  1. Navigate to Domo Documents.
Domo Documents navigation
  1. Select Create Collection, then select Connectors.
Create Collection connector option
  1. Select Google Drive.
Google Drive connector selection
  1. Select an existing Google Drive account or create a new one.
Google Drive account selection
  1. Select the Google Drive OAuth Enterprise connector.
Google Drive OAuth Enterprise connector option
  1. Enter your Client ID and Client Secret from when you created your Google Drive OAuth client.
Google Drive connector Client ID and Client Secret fields
  1. Select the appropriate Google account.
Google account selection screen
  1. If this is your personal Google Drive and your OAuth app is not fully verified (Testing Mode), select Advanced and continue to domo.com.
Google OAuth app verification warning
  1. Allow Domo to have access to Google.
Google permissions grant screen
  1. Select all access privileges and select Continue.
Google Drive access privileges selection
  1. Select Next, then select the content you want to load from Google Drive.
Google Drive content selection screen
  1. Type root for root directory, or enter the Drive ID.
Google Drive root directory field
Google Drive ID entry field
  1. Set the update schedule.
Document Collection update schedule settings
  1. Set the name and description of this Document Collection, then select Save.
Document Collection name and description fields
  1. 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.
Document Collection Files and Overview tabs