Prerequisites
The user performing the integration must be a G-Suite Administrator
A Reco user with Admin Role
Configure Google
-Click on "Create Project"
-Project name: Gmail-API-Reco-Connector
-Organization: Company Name
-Location: Company Location
-Click on "Create" and wait for the creation to finish
2. Click on "Create Service Account"
-Service Account Name: “Reco-gmail-connector’
-Service Account ID: Automatically Prefilled
-Service Account Description: ‘Enter Description’
-Click on Create and Continue
-No role needed
-Click on "Done"
3. Click on the created service account
-Click on Advanced Settings
-Copy the Client ID found under ‘Domain-wide delegation’
4. In a new tab, navigate to https://admin.google.com/ac/owl/domainwidedelegation
-Click on "Add New"
-Paste the previously copied Client ID
-Paste in the following 3 scopes
-Click on "Authorize"
5. Navigate back to the previous tab for the Google Cloud Admin Console
-Click on Keys
-Click "Add Key"
-Click Create New Key
-Select JSON
-Click Create
-At this point, Google will automatically create the file and download it to the computer
-Open the downloaded json
-Add the key-value pair: "admin_email": "<email of google workspace admin>"
6. Click on the Google Cloud Platform Navigation Menu (3 Lines At the Top Left of the page)
-Click on API and Services
-Select Library
-Search for “gmail api”
-Select it and Enable it
-Return to the Search page
-Search for ‘admin sdk api’
-Select it and Enable it
Integrate Gmail with Reco
Login to the Reco Platform
Click on "Configurations" then click on "Integrations"
Locate the "Gmail" object and click on "Add Integration"
Click on "Allow"
Copy the contents of the previously downloaded file (after you added the "admin_email" key) and paste it in the UI and click on "Allow"
Select the start date you would like to ingest metadata from, and click on "Start Extraction"
If the integration was successful, the Gmail Integration status will become "Active"
What do we ingest exactly?
Scope Name | Allows access to | Reference |
gmail.readonly | Read all resources and their metadata—no write operations | |
gmail.metadata | Read resources metadata including labels, history records, and email message headers, but not the message body or attachments | |
admin.directory.user.readonly | Scope for only retrieving users or user aliases |