Google Email Integration with OAuth 2.0
- 20 Oct 2022
- Print
- PDF
Google Email Integration with OAuth 2.0
- Updated on 20 Oct 2022
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
You can set up email integration with the OAuth 2.0 protocol with Microsoft 365 or Google. The instructions below can be applied to incoming or outcoming email integration or both.
To set up outgoing/incoming email integration with the OAuth 2.0 protocol with Google
- From the Protocol drop-down, select OAuth 2.0.
- Select Google.
- Create a project in Google:
- Navigate to Google Cloud Platform Console. If you haven't used this Google Cloud Platform Console yet, agree to their terms and conditions.
- Click Select a project.
- Click New Project.
- Enter a Project name, select an Organization and Location, and click Create.
- Add Gmail API and Google Calendar API scopes:
- From the Navigation menu, select APIs & Services > Library.
- Search for "Gmail API"and select it from the search results.
- Click Enable.
- Search for "Google Calendar API" and select it from the search results.
- Click Enable.
- From the Navigation menu, select APIs & Services > Library.
- Create a service account
- From the side menu, click Credentials.
- Click Create Credentials.
- Click Service Account.
- Enter any name for your service account.
- Click Create.
- From the side menu, click Credentials.
- Set Owner access:
- In the 'Grant This Service Account Access to Project' step click within the Select a role field.
- In the window that appears, select Project > Owner.
- Click Continue.
- Click Done.
- Edit the App registration:
- From the side menu, click OAuth consent screen.
- Select Internal.
- Click Create.
- Enter an application name (e.g. SysAid).
- Click in the User Supported Email field and select your email address.
- In the 'Developer Contact Information area enter the email address for the relevant developer,
- Click Save and Continue.
- From the side menu, click OAuth consent screen.
- Enter scope
- From the Scopes screen, click Add or Remove Scopes.
- Enter https://mail.google.com/.
- Select the option that appears in the drop-down.NoteIf the option you are searching for doesn't appear in the drop-down you may need to the enable the API on your account. Click the link for the Google API Library, search for the Gmail API and follow the instructions for enabling the API.
- Select the check box for Gmail API.
- Click Update.
- Repeat the Add Scope process and search for https://www.googleapis.com/auth/calendar to add the Google Calendar API.
- At the bottom of the Scopes screen, click Save and Continue.
- From the Scopes screen, click Add or Remove Scopes.
- Review the Summary page, and click Back to Dashboard.
- Generate a JSON credentials file:
- From the main navigation menu, select IAM and Admin > Service Accounts.
- Click your new service account.
- Select the check box for Enable G-Suite Domain-wide Delegation.
- Click Add Key.
- Click Create new key.
- Select JSON.
- Click Create.
- Save the downloaded JSON file to a location on your PC where you can access it later.
- Click Save.
- From the main navigation menu, select IAM and Admin > Service Accounts.
- Configure the Google admin console:
- Navigate to the Google admin console (https://admin.google.com/):
- Click Security.
- Navigate to Access and data control > API Controls.
- Click Manage Google Services.
- Make sure Gmail and Calendar are marked as unrestricted.
- Return to the Advanced Settings screen and select Manage Third-Party App Access.
- Click Configure new app.
- Select OAuth App Name Or Client ID.
- In the search box, enter the value of the 'client_id' parameter from your JSON file.
- Select the application you created.
- Select both Client ID check boxes and click Continue.
- Under App Access, select Trusted Can Access All Google Services.
- Click Configure.
- Return to the Advanced Settings screen and select Manage Domain Wide Delegation.
- Click Add New.
- In client ID field enter value of the 'client_id' parameter from your JSON file.
- In the OAuth scopes field, enter https://mail.google.com/ and https://www.googleapis.com/auth/calendar.
- Click Authorize.
- Enter the generated values in SysAid:
- Open the JSON file you generated.
- Copy the value of the "client_id" parameter.
- Paste the value into the Service Account field in SysAid.
- Copy the value of the "private_key" parameter.
- Paste the value into the Private Key field in SysAid.
- Follow the instructions in the relevant links below to fill out the rest of the email form. Be sure that the inbox that you set up for incoming email integration is dedicated specifically for incoming email integration with SysAid and not used for any other purposes.
Related content
Email list
Required network access
Email form
Outgoing email
Incoming email
Microsoft 365 Email Integration with OAuth 2.0
Email rules