Email Server Integration: Google Suite Setup

Prev Next

Prerequisites for Google Suite:

  • Service account private account.

  • Admin user has directory access.

Set-up an Email Service Account in Google Suite

Reference: Creating and enabling service accounts for instances | Compute Engine Documentation | Google Cloud

  1. Create a project for 6sense integration:
    mceclip0.pngmceclip1.png

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

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

    3. Click Create Project.

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

    5. When you’re finished entering the project details, click Create.

  2. Enable API for Gmail, Calendar, Admin SDK, and People:

    1. Go to the Google Cloud API Dashboard page. Make sure the project (Example: release test) is selected in the drop-down at the top of the page.

      mceclip2.pngmceclip3.png

    2. Click Enable APIs and Services.
      mceclip4.png

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

      mceclip5.png

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

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

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

      mceclip7.png

    7. Click Enable to enable the Google Calendar API, Contact SDK API, and Admin SDK API for this project.

  3. Create Service Account.

    1. Go to the Service Accounts page, Make sure the project (Example: 6sense service Account) is selected in the drop-down at the top of the page.

    2. Click Create Service Account.

      mceclip8.png

    3. Enter the details for the Service Account:

      • Service Account Name:
        Example: 6sense Service Account

      • Service Account Description:
        Example: Service account to sync emails and calendar with 6sense

        mceclip9.png

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

      mceclip10.png

    5. Generate a key for the service account and click Create Key. Select JSON for the key type and click Create. This will generate and download a key file. It will be needed later. Note the client ID of the service account it will be needed later (Service Accounts).

      mceclip11.pngmceclip12.png

    6. Admin user will need to enable Domain-Wide Delegation: Perform Google Workspace Domain-Wide Delegation of Authority | Directory API | Google Developers

    7. Select Security > Access and data control > API controls > Manage Domain Wide Delegation.
      mceclip13.pngmceclip14.png

    8. Click Add new to add API Scopes in OAuth Scopes.
      mceclip15.png

    9. Authorize the following:

      https://www.googleapis.com/auth/calendar.events.readonly, 
      https://www.googleapis.com/auth/calendar.readonly, 
      https://www.googleapis.com/auth/gmail.readonly, 
      https://www.googleapis.com/auth/contacts.readonly, 
      https://www.googleapis.com/auth/contacts.other.readonly, 
      https://www.googleapis.com/auth/admin.directory.group.readonly, 
      https://www.googleapis.com/auth/admin.directory.group.member.readonly, 
      https://www.googleapis.com/auth/admin.directory.user.readonly, 
      https://www.googleapis.com/auth/calendar.settings.readonly, 
      https://www.googleapis.com/auth/directory.readonly, 
      https://www.googleapis.com/auth/profile.agerange.read, 
      https://www.googleapis.com/auth/profile.emails.read, 
      https://www.googleapis.com/auth/profile.language.read, 
      https://www.googleapis.com/auth/user.addresses.read, 
      https://www.googleapis.com/auth/user.birthday.read, 
      https://www.googleapis.com/auth/user.emails.read, 
      https://www.googleapis.com/auth/user.gender.read, 
      https://www.googleapis.com/auth/user.organization.read, 
      https://www.googleapis.com/auth/user.phonenumbers.read, 
      https://www.googleapis.com/auth/userinfo.email, 
      https://www.googleapis.com/auth/userinfo.profile
    10. Add with service account email, admin user with directory access and JSON key file generated on 6sense ABM Email server integration configuration page.

    11. To limit data access to a specific group or organization follow these steps: Perform Google Workspace Domain-Wide Delegation of Authority | Directory API | Google Developers