In order for the Sublime Platform to access mail for your Google Workspace organization programmatically, you must upload a Google Cloud Platform service account key to which you've granted domain-wide delegation of authority for your Google Workspace organization. This is required so that only you have access to your mail, and not anyone else, including the Sublime team.
Google Workspace super administrator
To add a Google Workspace message source, you need to be a super administrator for your Google Workspace organization or get the help of a super administrator.
You must also have "Project creator" or greater IAM permissions for your organization.
There are 3 high-level steps to creating a service account key, which are described in detail below:
- Set up a Google Cloud Platform project
- Create a service account for the project
- Grant domain-wide delegation to the service account
- Go to https://console.cloud.google.com and sign in with your Google Workspace account
- If you've never used Google Cloud Platform before, agree to the terms
- Click the dropdown in the upper left
- Click the New Project button
- Add a project name in the Project name field (for example, "Sublime Platform")
- Click the Create button and wait a moment for the new project to be created
- Click Select Project in the notification for your new project in the upper right
- Type "admin sdk" into the search bar and select Admin SDK API in the search results
- Click the Enable button and wait for the page to reload when the Admin SDK API is enabled
- Type "gmail" into the search bar and select Gmail API in the search results
- Click the Enable button and wait for the page to reload when the Gmail API is enabled
- Type "cloud pub/sub" into the search bar and select Cloud Pub/Sub API in the search results
- Click the Enable button and wait for the page to reload when the Cloud Pub/Sub API is enabled
- Type "oauth" into the search bar and select OAuth consent screen in the search results
- Under User Type, select Internal
- Click the Create button
- Under App information, provide an app name (for example, "Sublime Platform")
- In the User support email dropdown, select your email address or any other available email address
- Scroll to the bottom of the interface and under Developer contact information, enter your email address
- Click the Save and Continue button. You can ignore the remaining OAuth options.
- In the Google Cloud Platform interface, type "service accounts" into the search bar and select Service Accounts in the search results
- Click the Create Service Account button
- Add a service account name (for example, "Sublime Platform") and optionally a service account description
- Click the Create and Continue button
- Under Grant this service account access to project, click the dropdown, search for "Pub/Sub Admin" and select the matching role.
- Click the Done button. You can ignore the remaining service account setup options.
- In the service accounts list, select the service account you just created
- Near the bottom of the details view, click Show Domain-Wide Delegation
- Check the box next to Enable Google Workspace Domain-wide Delegation
- Add a Product name for the consent screen (for example, "Sublime Platform")
- Click the Save button
- Copy the Client ID that appears and hold on to it for use later in this guide
- Click the Keys tab in the horizontal tabs list
- Click the Add Key dropdown
- Select Create new key
- Select the JSON key type if it's not selected by default
- Click the Create button and hold on to the file that is saved to your computer. This is the file you'll need when setting up a Google Workspace message source.
- Sign into the Google Workspace admin interface at https://admin.google.com
- Click the Security tile
- Scroll down and click the API controls section
- Scroll down and click Manage Domain Wide Delegation under Domain wide delegation
- Click Add new
- Paste the Client ID you copied when configuring the service account
- Paste this value into the OAuth scopes field:
- Click the Authorize button
When setting up a Google Workspace message source in the Sublime Dashboard, paste the contents of the service account key file you downloaded into the Service Account Key JSON field
Updated 12 days ago