...
Head over to the Enterprise tab on the Data screen as shown in the screenshot below.
...
Click on the Gmail icon. Squirro will show a prompt asking you to authenticate your Google account. Click on the Authenticate button there.
...
Once you sign-in you will be prompted to approve Gmail scopes. This screen is presented to you by Google asking you to provide consent for your Gmail data to Squirro.
...
Click Allow in on once more window screen to approve scopes.
...
After approving scopes you will be brought back to Squirro’s source configuration screen. This screen shows which Google account Squirro has connected to.
...
After creating the project go to the link https://console.developers.google.com/marketplace/product/google/gmail.googleapis.com and enable Gmail API service.
...
The next step is creating an OAuth consent screen. To do that first go back to your project’s settings and in the OAuth consent screen tab choose External user type (if you want to make the app available only to users within your organization choose Internal user type). Confirm your choice by clicking Create button.
...
On the next screen, choose the following options:
App name: Name of your app
User support email: Email for users to contact with questions about their consent
Authorized domains: When a domain is used on the consent screen or in an OAuth client's configuration, it must be pre-registered here
Email addresses: Email addresses for Google to notify about any changes to your project.
Other fields are necessary only when you are going to apply your app for production.
On the Scopes screen add
https://www.googleapis.com/auth/gmail.readonly
scope and click Update button.
...
On the next screen you can choose test users which will be able to connect to the app. To disable testing mode you need to apply for production status of the Gmail app. More about it information about how to do that you will find in the Apply for Production section below.
...
The last screen is a Summary screen, so you can see your final app settings to and make needed necessary corrections.
Go to the Credentials tab, click Create Credentials button and create choose OAuth client ID by clicking Create Credentials button option.
...
On the next screen, choose the following options as shown in the screenshot below and then click on Create button:
Application type: “Web application”
Name: Name of the client (could be whatever you want)
URIs: This is the URL Google will redirect the user to after successful authorization. This needs to be set to
https://<your-server-url>/dataloader/gmail_plugin/pl/google/authorized
on your server.
For example:https://squirro.example-company.com/dataloader/gmail_plugin/pl/google/authorized
.
...
Apply for Production
As was mentioned above, the app is in the testing mode by default. It means that it has some restrictions on using it. While the app is in the testing mode only test users are able to access the app. Also, the app is limited in terms of users (up to 100). Moreover, the app will show a warning that Google hasn’t verified this app during the user authorization process when the users connect their Squirro instance to their Google account. To avoid that, you have to apply for publishing the Gmail app.
...