Configuring G Suite Integration
Dispatch ships with several G Suite plugins (Docs, Groups, Drive, etc.,). This page documents the available configuration for these plugins and the permissions required to enable them.
Dispatch Configuration Variables
GOOGLE_DOMAIN
[Required]
Base domain for which this Google Cloud Platform (GCP) service account resides.
GOOGLE_DEVELOPER_KEY
[Required. Secret: True]
This is used by the Google API Discovery Service and prevents rate limiting.
GOOGLE_SERVICE_ACCOUNT_CLIENT_EMAIL
[Required]
The
client_email
value from your Google Cloud Platform (GCP) service account configuration file.
GOOGLE_SERVICE_ACCOUNT_CLIENT_ID
[Required]
The
client_id
value from your Google Cloud Platform (GCP) service account configuration file.
GOOGLE_SERVICE_ACCOUNT_DELEGATED_ACCOUNT
[Required]
Account to delegate to from the Google Cloud Platform (GCP) service account. Outgoing emails and other artifacts will appear to be from this account.
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY
[Required. Secret: True]
The
private_key
value from your Google Cloud Platform (GCP) service account configuration file.
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY_ID
[Required]
The
private_key_id
value from your Google Cloud Platform (GCP) service account configuration file.
GOOGLE_SERVICE_ACCOUNT_PROJECT_ID
[Required]
The
project_id
value from your Google Cloud Platform (GCP) service account configuration file.
GOOGLE_USER_OVERRIDE
[Optional. Default: None]
Used for development to funnel all emails to a specific user.
G Suite Setup
To set up G Suite integration, you'll need to create some resources in Google Cloud Platform and then link them to your G Suite organization.
Enable Required APIs in Google Cloud Platform
Navigate to the Google Cloud Platform (GCP) console. You will want to create a new GCP Project for Dispatch's integration.
Create a new service account within the GCP project (APIs & Services > Credentials > Create Credentials > Service Account). You do not need to assign any Google Cloud permissions to this service account when prompted.
Once created, download the JSON based key. You'll use these values to configure Dispatch:
project_id
->GOOGLE_SERVICE_ACCOUNT_PROJECT_ID
private_key_id
->GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY_ID
private_key
->GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY
client_email
->GOOGLE_SERVICE_ACCOUNT_CLIENT_EMAIL
client_id
->GOOGLE_SERVICE_ACCOUNT_CLIENT_ID
Then, create a Developer API key (APIs & Services > Credentials > Create Credentials > API Key), and set it to the value for GOOGLE_DEVELOPER_KEY
.
Enable the following APIs (APIs and Services > Library):
- Google Drive API
- Google Drive Activity API
- Google People API
- Google Docs API
- Google Calendar API
- Gmail API
- Admin SDK (necessary to create and manage groups)
Finally, create your OAuth application which is how G Suite will authorize the service account and API key (APIs & Services > OAuth Consent Screen). Specify the following scopes:
https://www.googleapis.com/auth/documents
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/directory.readonly
https://www.googleapis.com/auth/drive.activity.readonly
https://mail.google.com/
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/apps.groups.settings
https://www.googleapis.com/auth/calendar
Note: If you will not use Google Meet for your conference, then you do not need the https://www.googleapis.com/auth/calendar
scope.
Connecting Dispatch to G Suite
Navigate to the G Suite Admin Domain-wide Delegation page (Security > API Controls > Domain-wide Delegation) and add a new API client.
Enter the Client ID you used for GOOGLE_SERVICE_ACCOUNT_CLIENT_ID
, and then paste in a comma-separated list of the OAuth scopes above.