Google Workspace, formerly known as G-Suite, is a collection of business, productivity, collaboration, and education software developed and powered by Google. The most popular Google Workspace tools are Gmail, Drive, Docs, Sheets, and Slides.
Hevo allows you to use only service accounts to connect to Google Workspace applications.
Prerequisites
-
An active Google service account. Read Creating a Google service account if you do not already have one.
-
The respective Google Workspace APIs are enabled. The Google Sheets and Google Drive APIs for Google Sheets, and Google Drive APIs for Google Drive as a Source. Read Enabling API access for a Google service account.
-
The user has
iam.serviceAccountAdmin
privileges, for creating service accounts. Read Creating and managing service accounts - Cloud IAM Documentation. -
The user has
resourcemanager.projectIamAdmin
privileges, for adding and editing roles for any account. -
The user has the Owner role in the Google Cloud Platform.
Authenticating Using Google Service Accounts
To connect to Google Workspace applications such as Google Sheets and Drive through a service account, as a user with Owner role, you must:
-
Download the key file (in JSON format), which is used to authenticate you on the application.
-
Enable the respective APIs for your Google Workspace applications in your Google Cloud project for Hevo to be able to access the resource and read the data. For example, to connect to Google Sheets, you must enable the Google Sheets and Google Drive APIs. Similarly, to connect to Google Drive, you must enable the Google Drive API. Read Enabling API access for a Google service account.
(Optional) Creating a Google service account
If you have already created a service account for your team, skip to section Enabling API access for a Google service account below to enable Hevo to access the application’s API. Else, perform the following steps to create a Google service account:
-
Log in to your Google Cloud Platform with an Owner Role.
Note: Click here and check your role against your name. If you are not an Owner, contact your account Owner to perform the following steps.
-
In the left navigation menu, click IAM & Admin.
-
Under IAM & Admin, click Service Accounts.
-
Select the project in the drop-down at the top of the page.
-
Click + CREATE SERVICE ACCOUNT.
-
In the Service account details page, enter a Service account name and description and click CREATE AND CONTINUE.
The Service account ID is automatically created based on the service account name.
Enabling API access for a Google service account
For Google Workspace applications, you must enable the respective API of the application, to enable the service account to read your data.
To do this:
-
Log in to your Google Cloud Platform console.
-
In the left navigation pane, click APIs & Services, and then click Library.
-
In the API Library page, search for the API using the search box and click on it.
-
Click ENABLE to enable the API. For example, you must enable both the Google Drive API and Google Sheets API for accessing Google Sheets for a service account.
Downloading the service account key file
Service account credentials are usually stored as a key file in JSON format. You need the key file to connect your service account to Hevo.
To download the file:
-
Log in to your Google Cloud Platform as Owner.
-
Navigate to the IAM, Service Accounts page.
-
Click on the newly created service account.
-
Navigate to the KEYS tab.
-
Click ADD KEY, and then click Create new key.
-
Select the Key type as JSON, and click CREATE. This downloads the key file.
Note: Hevo supports only JSON format for the key file.
You need to use this key file to connect your Google Workspace applications to Hevo through the service account.