1. Set up your Google Cloud Platform (GCP) organization
    1. If you are a G-Suite or Cloud identity customer, an Organization resource is provided to you automatically
    2. 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 Engagio
    1. Go to the Manage Resources page in the Cloud Console.
    2. Select Organization in the dropdown at the top of the page and select the organization you want to create a project for.
    3. Click Create Project
    4. In the New Project window enter a project name (Ex: Engagio Service Account) and select a billing account.
    5. When you're finished entering the project details click Create.
  3. Enable API for Gmail and Claendar
    1. Go to the Google Cloud API Dashboard page. Make sure the project (Ex: Engagio Service Account) is selected in the dropdown at the top of the page.
    2. Click Enable APIs and Services
    3. Search for Gmail and click on the Gmail API from the search results.
    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 on Google Calendar API from the search results.
    7. Click Enable to enable the Google Calendar API for this project.
  4. Create a Service Account
    1. Go to the Service Accounts page, Make sure the project (Ex; Engagio Service Account) is selected in the dropdown at the top of the page.
    2. Click Create Service Account
    3. Enter the details for the Service Account
      1. Service Account Name:
        Ex: Engagio Service Account
      2. Service Account Description:
        Ex: Service account to sync emails and calendar with Engagio
      3. Click Create
    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 will generate and download a key file. Please keep this, key will be used in Step 7.
    6. Click Done
  5. Enable G-Suite Domain-wide Delegation
    1. Go to the Service Accounts page. Make sure the project (Engagio Service Account) is selected in the dropdown at the top of the page.
    2. Click on the service account created in step 4. (Engagio Service Account)
    3. Make note of the Unique ID. This will be used in Step 6.d
    4. Click Edit
    5. Click Show Domain-Wide Delegation
    6. Click the checkbox next to the Enable G-Suite Domain-Wide Delegation.
    7. Click Save
  6. Grant permissions to the service account in G-Suite
    1. Login to your G-Suite Admin Portal
    2. Click Security
    3. Click Advanced Settings and Manage API Client Access
    4. Authorize the service account created in step 4.
      1. Client Name: Unique ID from Step 5.c
      2. One or more API Scopes:
        https://www.googleapis.com/auth/calendar.events.readonly
        https://www.googleapis.com/auth/calendar.readonly
        https://www.googleapis.com/auth/gmail.readonly
      3. Click Authorize
  7. Add the service account to Engagio
    1. In Engagio go to Settings
    2. Under Platform Click Email Service Account
    3. Click Enable Service Account
    4. Enter Service Account Email
    5. Add Key from 5.c
    6. Click Connect