[Google] Setup an Email Service Account in G-Suite
- Set up your Google Cloud Platform (GCP) organization
- If you are a G-Suite or Cloud identity customer, an Organization resource is provided to you automatically
- The G-Suite or Cloud Identity super administrators are the first users who can access the organization upon creation
- Create a Google Cloud Project for Engagio
- Go to the Manage Resources page in the Cloud Console.
- Select Organization in the dropdown at the top of the page and select the organization you want to create a project for.
- Click Create Project
- In the New Project window enter a project name (Ex: Engagio Service Account) and select a billing account.
- When you're finished entering the project details click Create.
- Enable API for Gmail and Claendar
- 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.
- Click Enable APIs and Services
- Search for Gmail and click on the Gmail API from the search results.
- Click Enable to enable the Gmail API for this project.
- Click the back arrow next to the API Library
- Search for Calendar and click on Google Calendar API from the search results.
- Click Enable to enable the Google Calendar API for this project.
- Create a Service Account
- 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.
- Click Create Service Account
- Enter the details for the Service Account
- Service Account Name:
Ex: Engagio Service Account
- Service Account Description:
Ex: Service account to sync emails and calendar with Engagio
- Click Create
- Service Account Name:
- For service account permissions select Project → Viewer and Click Continue
- 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, key will be used in Step 7.
- Click Done
- Enable G-Suite Domain-wide Delegation
- Go to the Service Accounts page. Make sure the project (Engagio Service Account) is selected in the dropdown at the top of the page.
- Click on the service account created in step 4. (Engagio Service Account)
- Make note of the Unique ID. This will be used in Step 6.d
- Click Edit
- Click Show Domain-Wide Delegation
- Click the checkbox next to the Enable G-Suite Domain-Wide Delegation.
- Click Save
- Grant permissions to the service account in G-Suite
- Login to your G-Suite Admin Portal
- Click Security
- Click Advanced Settings and Manage API Client Access
- Authorize the service account created in step 4.
- Client Name: Unique ID from Step 5.c
- One or more API Scopes:
- Click Authorize
- Add the service account to Engagio
- In Engagio go to Settings
- Under Platform Click Email Service Account
- Click Enable Service Account
- Enter Service Account Email
- Add Key from 5.c
- Click Connect