Set Up a Google Email Service Account

  • Updated

Connect a Google Email Service Account to allow Demandbase to sync emails and calendar meetings for Demandbase users in your Google Workspace organization without requiring individual authentication.

 

See Understanding Email Service Accounts.


Prerequisites to Set Up a Google Email Service Account

  • The Email Service Account feature must be enabled by Demandbase. Contact Demandbase Support for assistance.
  • You must have Admin privileges or be assigned to a permission set with the required Demandbase settings access.
  • You must have the required Google Cloud and Google Workspace administrator permissions to create service accounts and configure domain-wide delegation.

Step 1: Verify Your Google Cloud Organization

Google automatically creates an Organization resource for Google Workspace and Cloud Identity customers. Google Workspace or Cloud Identity super administrators are initially granted access to the Organization resource.

Verify that your Organization resource is available in the Google Cloud Console.


Step 2: Create a Google Cloud Project

Create a Google Cloud project for the Demandbase Email Service Account.

  1. In the Google Cloud Console, go to Manage Resources.
  2. Click Create Project.
  3. Enter the following:
    1. Project Name: Enter a name, such as Demandbase Service Account.
    2. Parent Resource: Select your Google Cloud Organization.
  4. Click Create.

Step 3: Enable Gmail and Google Calendar APIs

  1. Go to the Google Cloud API Dashboard.
  2. Select the project created in Step 2.
  3. Click Enable APIs and Services.
  4. Search for and select Gmail API.
  5. Click Enable.
  6. Return to the API Library.
  7. Search for and select Google Calendar API.
  8. Click Enable.

Step 4: Create a Google Service Account

Create a service account and generate the credentials required to connect Demandbase.

  1. Go to the Service Accounts page.
  2. Select the project created in Step 2.
  3. Click Create Service Account.
  4. Enter the following:
    1. Service Account Name: Enter a name, such as Demandbase Service Account.
    2. Service Account Description: Enter a description, such as Service account to sync emails and calendar meetings with Demandbase.
  5. Click Create and Continue.
  6. Under service account permissions, select Project > Viewer.
  7. Click Continue, then Done.
  8. Open the newly created service account and go to the Keys tab.
  9. Click Add Key > Create New Key.
  10. Select P12 and click Create to generate and download the key file.
  11. Save the key file securely for use in Step 7.
  12. Copy the Service Account Email for use in Step 7.

Step 5: Get the Service Account Client ID

Retrieve the client ID required to configure Google Workspace domain-wide delegation.

  1. Go to the Service Accounts page.
  2. Select your Google Cloud project.
  3. Click the service account created in Step 4.
  4. Copy the Unique ID (numeric client ID) for use in Step 6.

Step 6: Configure Google Workspace Domain-Wide Delegation

Authorize the service account to access Gmail and Google Calendar data using the required OAuth scopes.

  1. Log in to the Google Admin Portal with a super administrator account.
  2. Go to Security > Access and data control > API controls.
  3. Under Domain-wide delegation, click Manage Domain Wide Delegation.
  4. Click Add New.
  5. Enter the following:
    • Client ID: Enter the Unique ID copied in Step 5.
    • OAuth Scopes: Enter the following scopes, separated by commas:
      • https://www.googleapis.com/auth/calendar.events.readonly
      • https://www.googleapis.com/auth/calendar.readonly
      • https://www.googleapis.com/auth/gmail.readonly
  6. Click Authorize.

Step 7: Connect the Google Service Account in Demandbase

Add the service account credentials in Demandbase to enable email and calendar synchronization.

  1. From the left navigation bar, go to Settings_N.png Settings > Platform > Email Service Account.
  2. Click Connect Service Account.
  3. Click Login with Google.
  4. Enter the following:
    1. Service Account Email: Enter the email address copied in Step 4.
    2. Key: Add the service account key generated in Step 4.
  5. Grant the requested permissions.
  6. Click Connect.

Outcome of Setting Up a Google Email Service Account

After the service account is connected, Demandbase can authenticate and sync supported email and calendar communications for Demandbase users in your Google Workspace domain without requiring individual account authentication.

Was this article helpful?

6 out of 6 found this helpful