Intro
The Google Sheets Metadata Connector retrieves metadata from a specified Google Sheet located within your Google Drive for file management and reporting purposes. To utilize, select the target Google Sheet and then choose the desired metadata fields to generate a report. The connector supports reporting on any combination of the following metadata attributes:- Spreadsheet Name
- Spreadsheet ID
- Spreadsheet URL
- Time Zone
- Locale
- Sheet Count
- Sheet Name(s)
- Sheet ID(s)
- Sheet Index(es)
- Column Count
- Row Count
- Column Headers
- Owner Email(s)
- Shared With (Emails and Access Level)
- File Size
- Last Edited Time
- Last Editing User Email
Prerequisites
To connect to your Google Sheets Metadata account and create a DataSet, you need your application Client ID and Client Secret.Creating a Google Cloud Project
Follow these steps to create a new project in Google Cloud Console for the Google Sheets Metadata Connector:- Navigate to the Google Cloud Console at
https://cloud.google.com/cloud-console. - In the top right corner of the screen, select Console.
- If you are accessing Google Cloud Console for the first time, then verify that you’re logged into the correct account and that your country of residence is correct. Agree to the terms of service, and then click AGREE AND CONTINUE.
- In the top left corner of your screen, click the project name. (If you’re a first-time user, this will display as “Select a project.”)
- In the top right corner of the window that appears, click NEW PROJECT.
- Name your project as Domo Sheets Connector. You may optionally select an organization or choose No organization, and click CREATE.
- After clicking CREATE, you will return to the home screen. Go back to the top left and click the project name (or “Select a project”) once more.
- From the list, click the name of the project you just created (Domo Sheets Connector). This will take you to the project’s home page.
- Scroll down to the Quick access menu in the middle of the page and select the APIs & Services checkbox.
Enabling Required APIs
After navigating to the APIs & Services page for your new project, you need to enable the necessary Google APIs.- On the menu of the APIs & Services page, select Library.
- In the API Library, scroll down to the Google Workspace section.
- Click the Google Drive API (located on the left side of the page).
- On the Google Drive API page, select “Enable.” This action enables the API for use with your project and returns you to the APIs & Services page.
- Repeat this exact process to enable the Google Sheets API.
Setting up OAuth 2.0
To configure the OAuth 2.0 access for your project:- From the left navigation menu on the APIs & Services page, select OAuth consent screen.
- For User Type, select External.
- Click CREATE. This will take you to a page where you can begin configuring the details of your OAuth consent screen (these settings can be modified later).
Configuring the OAuth 2.0 Consent Screen Details
On the OAuth consent screen configuration page, provide the following required information:- App name: We recommend the app name as Google Sheets Metadata Connector.
- User support email: Enter your own email address. (You can add other users later.)
- Optional fields: You do not need to add an app logo or domain.
-
Scroll down to the Authorized Domains section.
- Select ADD DOMAIN, and enter
domo.comin the text box.
- Select ADD DOMAIN, and enter
- In the Developer contact information section, enter your email address.
- Select SAVE AND CONTINUE. This action saves your details and advances you to the next configuration step: Scopes.
Configuring OAuth 2.0 Scopes
On the Scopes configuration page, you must add the specific read-only scopes required for the connector to access Google Drive and Sheets metadata.- Add Google Drive Metadata Scope
- At the top of the Scopes page, select ADD OR REMOVE SCOPES.
-
In the Enter property name or value search bar enter the following Google Drive Metadata scope exactly as shown:
https://www.googleapis.com/auth/drive.metadata.readonly - Click the suggestion that appears under Values.
- In the next screen, select the checkbox to the left of Google Drive API.
- Click UPDATE.
-
The window will close. Verify that the following scope is now listed under Your restricted scopes :
.../auth/drive.metadata.readonly - Add Google Sheets Read-Only Scope
- Repeat the process by selecting ADD OR REMOVE SCOPES again.
-
In the search bar, type the following Google Sheets scope exactly as shown:
https://www.googleapis.com/auth/spreadsheets.readonly - Click the suggestion that appears, select the checkbox next to Google Sheets API, and click UPDATE.
-
Verify that the following scope is now listed under Your sensitive scopes:
...auth/sheets.metadata.readonly
Configuring OAuth 2.0 Test Users
The next page, Test Users, allows you to specify which individuals can use the credentials generated by this project to complete the OAuth 2.0 connection.- Select ADD USERS.
- In the window that appears, enter the email addresses associated with the Google accounts of the people who need to use this connector in your Domo instance. You can add up to 100 users without needing to publish the app through Google.
- Click ADD (Users can be added or removed in later edits).
- Click SAVE AND CONTINUE once you’ve added all necessary users.
Review and Complete OAuth 2.0 Setup
The final page is the Summary screen, which displays all the configuration details you have entered.- Review all the information (App details, Scopes, and Test Users) to ensure it is correct.
- Once confirmed, click BACK TO DASHBOARD.
Creating the OAuth Client ID
You will now create the credentials that the Domo connector will use to access the configured APIs.- From the left menu, select Credentials.
- On the top of the Credentials Dashboard, click CREATE CREDENTIALS and select OAuth client ID from the dropdown menu.
- On the next screen, from the top of page, select Web Application from the Application Type dropdown menu.
- Enter a Client name (we recommend Domo Sheets Connector Client).
- Scroll down to the Authorized redirect URIs section and click ADD URI.
- Enter the following exact URI:
https://oauth.domo.com/api/data/v2/oauth/providers/google-drive-metadata-98e4dc30-1712-4b80-85ec-ed6cf3cb1e6b/exchange - Click CREATE at the bottom of the page.
- Securely save both the Client ID and Client Secret, as you will need them to set up the connector in Domo.
- You can also view these credentials later by returning to the Credentials Dashboard or downloading them in JSON format.
Connecting to Your Google Sheets Metadata Account
This section enumerates the options in the Credentials and Details panes on the Google Sheets Metadata Connector page. The components of the other panes on this page, Scheduling, and Name & Describe Your DataSet, are universal across most connector types and are discussed in great detail in Adding a DataSet Using a Connector.Credentials Pane
This pane contains fields for entering credentials to connect to your Google Sheets Metadata account. The following table describes what is needed for each field:Field | Description |
|---|---|
| Client ID | Enter your application Client Id. To create the Client ID, refer to the Creating the OAuth Client ID section above. |
| Client Secret | Enter your application Client Secret. To create the Client Secret, refer to the Creating the OAuth Client ID section above. |
Details Pane
Menu | Description | ||||
|---|---|---|---|---|---|
Report | The Google Sheets Metadata has a single report to run.
| ||||
| Sheet Id | Select the Google Sheet for which you would like to receive the data. | ||||
| Metadata | Select the metadata you would like to include in your report. |