Google Workspace is commonly used across the teams in a company and holds huge amount of collaboration information. This guide shows you how to enable analytics across the products like Calendar, Docs, Meets, Email, and more.
To create a reliable integration between Google Workspace and Flowtrace, we use concept called service account, and domain-wide delegation. This guide is split into 4 steps:
Creating a Google Cloud project and enabling the desired APIs
Creating a service account which is used to access your Google API's
Configuring domain-wide delegation in Google Workspace Administration
Creating and uploading the service account credentials into Flowtrace
To be able to complete this integration you need:
Permissions to create a project / service account in your Google Cloud Account
Administrator rights to manage your Google Workspace installation
Administrator access to Flowtrace
1. Creating a Google Cloud project
You can choose to create a new Google Cloud project to keep Flowtrace integration isolated from your other needs, or you can use an existing project to enabled the APIs and create the service account.
Select your existing project, or create a new with Google's instructions.
Navigate to APIs and services > Enable APIs and services.
Click "Enable APIs and service" and find and enable following APIs:
Admin SDK API - used for user and team structure (required)
Google Calendar API - used to analyse company calendars (recommended)
Gmail API - used to analyse email sending patterns (recommended)
You should end up having below APIs enabled for the project:
2. Creating a service account
Creating a service account involves couple of steps which we will go through here. You should continue to have the project open where you enabled the APIs in the previous step.
Navigate to IAM and Admin > Service Accounts
Click "Create Service Account"
Fill in the name, and description of your service account
Click "Done" (optional steps are not required)
3. Configuring domain wide delegation
This step ensures the service account we just created has access to your Google Workspace. You will have complete control on what access the service account will have on your workspace.
Service Account Client ID
Navigate to IAM and Admin > Service Accounts
Select the newly created service account's details
Show "Advanced settings" and copy the "Client ID" number.
Configuring the permissions of the service account
We configure the permission in your Google Workspace administrator site. This grants the service account an access to Google Workspace applications.
Click "Add new" and use the Client ID we found in previous step
Add following Oauth scopes to the API Client:
Store the API client by clicking "Authorize"
You can verify your API client and its Oauth scopes by clicking "View details":
4. Creating and uploading the service account credentials
We have thus far created a service account, allowed its access to Google API's, and we have configured the access to your Google Workspace via the domain-wide delegation. The last step to complete the integration is to allow Flowtrace to use this newly created service account.
Create an access key to the service account
Navigate again to IAM and Admin > Service Accounts
Select the service account and go to its "Keys" tab
Create a new key by clicking "Add key" and "Create new key" in "JSON" format.
This will automatically download a "json" file to your computer.
Upload the access key to Flowtrace
Navigate to Flowtrace > Settings > Integrations
Click "Upload key file"
Fill in the Google Workspace super admin's email address
Copy the contents of the keyfile in previous step to the given field
Click "Validate and Save" to complete the integration
Delete the key file from your local computer (you can always create a new key and re-upload it to Flowtrace if you need to)