This integration enables Pattyrn to access your Google Workspace (formerly G Suite) data. The data from your Google Workspace will allow Pattyrn to give better insights and metrics.
Before connecting your Google Workspace, please read or refresh yourself on the general flow for Connecting Apps.
Create a Google Service Account
For Pattyrn to securely connect to Google Workspace, you need to create a Google Service Account. Please follow these steps to create a Service Account:
Log Into Google Cloud Console as the administrator for your company’s account: https://console.cloud.google.com
From the menu in the upper-left corner, choose “IAM & Admin” → “Service Accounts”
Click on “+ Create Service Account”
Give the service account a meaningful name and description. We recommend that the word “Pattyrn” be used in these fields. When finished, click “Create and Continue”
Grant the service account “Viewer” access to your project in Google, then click “Continue”
Grant any additional users access to the service account that you wish.
You will be returned to a list of service accounts for your project. Click on the one you just created and note the assigned “Unique ID”.
Return to the list of service accounts for your project. Find the one you just created and click on the three dots in the far-right column. Choose “Manage Keys”
On the following screen, click on “Add Key” and then “Create New Key”
Choose JSON for the Key type and click “Create”
A download window will appear. Save the file in a secure location. You will need to upload the contents of this file to Pattyrn in a later step.
Now open a new browser tab and navigate to “Google Admin”: https://admin.google.com
From the menu in the upper-left corner, choose “Security” → “Access and data control” → API controls
Now in the right-hand pane of the screen, scroll down to the bottom and click on “Manage Domain-Wide Delegation”
You should see the service account you just created on this screen. The “Client ID” on this screen should match the “Unique ID” of your service account from the Google Cloud Console
Edit this account by hovering over its row and clicking on the edit link on the right side of the screen
Authorize scopes in the dialog that appears
You will need to authorize the following scopes:
To read calendars: https://www.googleapis.com/auth/calendar
To read emails: https://www.googleapis.com/auth/gmail.readonly
To read drive: https://www.googleapis.com/auth/drive.activity.readonly
After you have authorized the correct scopes for your service account, log into Pattyrn and navigate to the connection hub.
After creating a Google Service Account, sign in to Pattyrn and click on the Connection Hub Icon. Then click on the Google app card, shown in Figure 1.
Figure 1: Google App Card
You should now see the Google App Login, like in Figure 2.
Figure 2: Google App Login
First, select how you would like to upload the service account in the Google App Login form. We recommend uploading the Service Account as a file if possible. After selecting your upload method, you will see a form like in Figure 3.
Figure 3: Google App Login Form
You will need to enter your Google Workspace admin's email in the first input of the form. Next, you will need to upload your Service Account. You can either drag and drop the file into the area surrounded by the dashed outline or click browse to select the file. After both inputs have been filled out, you can click the submit button to finalize the connection.
Resources for Creating a Service Account
In case you have trouble creating a Service Account, you can use these additional resources.