Skip to main content

Set Up an Email Service Account in Google G-Suite (Gmail)

  • Updated

Context

Connect to the 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.

The steps include:

Steps

1. Set Up Your Google Cloud Platform (GCP) Organization

a. If you are a G-Suite or Cloud identity customer, an Organization resource is provided to you automatically.

b. The G-Suite or Cloud Identity super administrators are the first users who can access the organization upon creation.

2. Create a Google Cloud Project for Demandbase

a. Go to the Manage Resources page in the Cloud Console.

b. Select Organization in the drop-down list at the top of the page and select the organization you want to create a project for.

c. Click Create Project.

d. In the New Project window, enter a project name (Example: Demandbase Service Account) and select a billing account.

e. When you're finished entering the project details, click Create.

3. Enable API for Gmail and Calendar

a. Go to the Google Cloud API Dashboard page. Make sure the project (Example: Demandbase Service Account) is selected in the drop-down list at the top of the page.

b. Click Enable APIs and Services.

c. Search for Gmail and click the Gmail API from the search results.

d. Click Enable to enable the Gmail API for this project.

e. Click the back arrow next to the API Library.

f. Search for Calendar and click Google Calendar API from the search results.

g. Click Enable to enable the Google Calendar API for this project.

4. Create a Service Account

a. Go to the Service Accounts page. Make sure the project (Example: Demandbase Service Account) is selected in the drop-down list at the top of the page.

b. Click Create Service Account.

c. Enter the details for the Service Account and click Create.
Service Account Name: Example: Demandbase Service Account
Service Account Description: Service account to sync emails and calendar with Demandbase.

  d. For service account permissions select Project > Viewer and click Continue.

  e. Generate a key for the service account.
  - Click Create Key.
  - Select P12 for the key type and click Create.
  - This will generate and download a key file. Please keep this; you will use the key in Step 7.

  f. Click Done.

5. Enable G-Suite Domain-wide Delegation

a. 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.

b. Click the service account created in step 4. (Example: Demandbase Service Account).

c. Make note of the Unique ID. This will be used in Step 6.

d. Click Edit.

e. Click Show Domain-Wide Delegation.

f. Click the checkbox next to the Enable G-Suite Domain-Wide Delegation.

g. Click Save.

6. Grant Permissions to the Service Account in G-Suite

a. Go to the G-Suite Admin Portal and log in.

b. Click Security.

c. Click API Controls.

d. Click Manage Domain Wide Delegation.

e. Click Add New

f. Client Name: Unique ID from Step 5.3.

g. 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

h. Click Authorize.

7. Add the Service Account to Demandbase

a. From the left navigation bar, go to Settings_N.png Settings > Platform > Email Service Account.

b. Click Enable Service Account.

c. Enter Service Account Email.

d. Add the Key from Step 4.e. 

e.  Click Connect

Was this article helpful?

2 out of 2 found this helpful