Skip to main content

Set Up an Email Service Account in Google Workspace (Gmail)

  • Updated

Connect to the Google Email Service Account to authenticate all email addresses under the same domain. This allows Demandbase to monitor emails and calendars for account meetings and communications. See Understanding Email Service Accounts.

Prerequisites

  • You must have Admin privileges or be assigned to a permission set with the required Demandbase settings access.
  • The Email Service Account feature must be enabled by Demandbase. Contact Demandbase Support for assistance. 

Step 1: Set Up Your Google Cloud Platform (GCP) Organization

If you are a Google Workspace or Cloud Identity customer, an Organization resource is created for you automatically. The Google Workspace or Cloud Identity super administrators are the first users who can access the Organization when it is created.

Step 2: Create a Google Cloud Project for Demandbase

  1. In the Google Cloud Console, go to the Manage Resources page.
  2. Click Create Project.
  3. Enter a project name (Example: Demandbase Service Account) and select the Parent Resource.
  4. Click Create.

Step 3: Enable API for Gmail and Calendar

  1. Go to the Google Cloud API Dashboard page. Make sure the project (Example: Demandbase Service Account) is selected.
  2. Click Enable APIs and Services.
  3. Search for Gmail and click the Gmail API.
  4. Click Enable.
  5. Click the back arrow next to the API Library.
  6. Search for Calendar and click Google Calendar API.
  7. Click Enable.

Step 4: Create a Service Account

  1. Go to the Service Accounts page. Make sure the project (Example: Demandbase Service Account) is selected.
  2. Click Create Service Account.
  3. Enter the details for the Service Account and click Create.
    1. Service Account Name: Example: Demandbase Service Account
    2. Service Account Description: Service account to sync emails and calendar with Demandbase.
  4. For service account permissions, select Project > Viewer and click Continue.
  5. Generate a key for the service account.
    1. Click Create Key.
    2. Select P12 for the key type and click Create.
    3. This generates and download a key file. Make sure to keep the file to use in Step 7.
  6. Click Done.
  7. Make note of the email address associated with the new service account to use in Step 7.

Step 5: Enable Google Workspace Domain-wide Delegation

  1. Go to the Service Accounts page. Make sure the project (Example: Demandbase Service Account) is selected in the drop-down at the top of the page.
  2. Click the service account created in Step 4. (Example: Demandbase Service Account).
  3. Make note of the Unique ID to use in Step 6.

Step 6: Grant Permissions to the Service Account in Google Admin Portal

  1. Log in to the Google Admin Portal.
  2. Click Security.
  3. Click API Controls.
  4. Click Manage Domain Wide Delegation.
  5. Click Add New
  6. Client Name: Unique ID from Step 5.3.
  7. Add One or more API Scopes in OAuth Scopes (comma delimited):
    • https://www.googleapis.com/auth/calendar.events.readonly
    • https://www.googleapis.com/auth/calendar.readonly
    • https://www.googleapis.com/auth/gmail.readonly
  8. Click Authorize.

Step 7: Add the Service Account to Demandbase

  1. From the left navigation bar, go to Settings_N.png Settings > Platform > Email Service Account.
  2. Click Enable Service Account.
  3. Enter the Service Account Email from Step 4.
  4. Add the Key from Step 4.5. 
  5. Click Connect.

Was this article helpful?

6 out of 6 found this helpful