Connecting Integromat To Google Services Using a Custom OAuth Client

In this article, we will show you how to create your own project in Google Cloud Console and a custom OAuth client. This is useful for connecting restricted Google services, like Google Drive or Gmail, to Integromat.

The following procedure is intended for:
  • Personal use (@gmail.com and @googlemail.com users) 
  • Internal use (Google Workspace (formerly GSuite) users that prefer to use a custom OAuth client) 

Prerequisites:

  • a Google account 
If you prefer video over the step-by-step text-based guide, please watch the following video tutorials:

Google Drive App - OAuth Setup Workflow


Gmail App - OAuth Setup Workflow


Follow these steps to create a custom OAuth client for Google services:

1. Sign in to Google Cloud Platform using your Google credentials.

2. Open the Dashboard, and click the CREATE PROJECT button.

gZ7YAZUebN.gif

3. Enter the desired project name, and click the CREATE button.

SfAq1o84K8.gif

4. Click the ENABLE APIS AND SERVICES button.

5. Type the name of the service you would like to use (for example, Gmail API, or Google Drive API) in the Search for APIs & Services field.

6. The desired service option should display as you type. Click on the API/service you want to connect to Integromat.

IfuoYatgIX.gif

7. Click the ENABLE button to enable the selected API.

2020-05-26_12_40_38-APIs___Services_-_Custom_OAuth_Client_-_Google_API_Console.png

8. Go to APIs & ServicesOAuth consent screen settings, choose the External option, and click the CREATE button.

PclXt3fhIB.gif

 

You will not be charged when selecting this option. For more details, please refer to Google's Exceptions to verification requirements.

9. Fill in the required fields as follows:

For OAuth consent screen section:

Application name

Enter the name of the app asking for consent.

For example: Integromat.

User Support Email

Select your email.

Authorized domainsintegromat.com
Developer contact informationEnter your email.

For the Scopes section:

Click the Add or Remove Scopes button to add the required scopes.

Scopes for Google APIs

Add required scopes for the Google service you want to connect to Integromat.

M2cXJpxIbq.gif

The list of required scopes:

SERVICE/API

REQUIRED SCOPES

Gmail
https://mail.google.com/
https://www.googleapis.com/auth/gmail.labels
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.compose
https://www.googleapis.com/auth/gmail.insert
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.metadata
Google Drive
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly

For the Test Users section:

The Optional Info section is displayed only for non-Google Workspace users and does not contain any required fields.
This step is required, otherwise, you won't be able to establish a connection with Integromat.

Click the ADD USERS button to add the email address associated with the Google account you want to connect with Integromat.

10. Open the Credentials settings page.

If this is not the first API/SERVICE (Gmail or Google Drive) you have enabled, you don't have to create credentials, as you have already created the credentials previously.

11. Click the +CREATE CREDENTIALS button, and select the OAuth client ID option.

UI5xuJoIUv.gif

12. Fill in the required fields as follows, and then click the CREATE button to create the application:

Application typeWeb application
Namee.g. Integromat
Authorized redirect URIs

Add one of the following URIs:

  • https://www.integromat.com/oauth/cb/google-restricted
    (For Gmail or Google Drive)
  • https://www.integromat.com/oauth/cb/google
    (for other Google apps)
  • https://www.integromat.com/oauth/cb/google-custom
    (for Google Text-to-Speech)
  • https://www.integromat.com/oauth/cb/app
    (for any app created via the Integromat Developer Platform)



13. A dialog containing the app's Client ID and Client Secret is displayed.

14. Go to Integromat, open the Create a connection dialog of the desired Google module (e.g., Gmail or Google Drive), and open the advanced settings by clicking the Show advanced settings checkbox.

ftkBPidLmh.gif

15. Enter the Client ID and Client Secret you retrieved in step 14 (above) to the respective fields, and click Continue.

16. Sign in with your Google account.

17. The This app isn't verified window appears.

The app = your OAuth client you have created above.

Click on the Advanced link, and then on the Go to Integromat (unsafe) link to allow access using your custom OAuth client.

IIthSk8IWb.gif

18. Click Allow to grant Integromat permission.

2020-05-26_15_28_34-Sign_in_-_Google_Accounts.png

19. Click the Allow button to confirm your choices.

2020-05-26_15_29_48-Sign_in_-_Google_Accounts.png

Congratulations! The connection to the desired Google service using a custom OAuth client has been established.

Common Problems

100 Logins Limit Per Day Has Been Reached

This happens rarely, but when it does, we recommend creating another OAuth client.

[403] Access Not Configured

If this error message is displayed, you haven't enabled the corresponding API in your Google Cloud Platform.

mceclip0.png

To enable the API, please follow step 4, step 5step 6, and step 7 as described above.

Authorization Error - Error 403: access_denied

image.png

Google has added the required settings for the Consent screen. You'll need to add the email address associated with the Google account you want to connect with Integromat as a Test user.

1. Sign in to the Google Cloud Platform using your Google credentials.

2. Go to APIs & Services > OAuth consent screen.

3. In the Test Users section, click the ADD USERS button to add a test user. Enter the email address associated with the Google account you want to connect with Integromat, and click Save.

S4tRicdgTq.gif

4. Now, go to Integromat, and connect to the desired Google service.

Failed to verify connection 'My Google Restricted connection'. Status Code Error: 400

Your connection has expired and is no longer valid. You need to reauthorize the connection.

This error affects non-Google Workspace accounts. For more details please refer to the Google OAuth documentation.

Solution

Reauthorize your Google connection.

1. Log in to Integromat.

2. Navigate to Connections.

2021-03-15_11_13_15-Window.png

3. Find your Google connection and click Reauthorize button.

2021-03-15_11_18_02-Window.png

To prevent the expiration of your Google connection, we suggest you to reauthorize the connection every week.

Popular use cases from our blog

Using Notion as CMS for Webflow -Tutorial- -illustration.png

How to Use Notion as a CMS for Your Webflow Site [Tutorial]

Basic-tutorial-for-Revolut-users-illustration.png

How to Create Your First Revolut Business Automation [Tutorial]

cancelled saas subscriptions-ILLUSTRATION.png

How to Track SaaS Subscriptions to Reduce Churn [Tutorial]

jira-excel-automation.png

How to Export From Jira to Excel Using Integromat [Tutorial]

influencer partner code sign up tracking-Illustration.png

How to Track Influencer Campaigns With Integromat

Invoice3-automation-illustration.png

How to Get Paid Fast: A Do-It-Yourself Automated Invoicing System

Didn’t find what you were looking for?

Ticket

Create a ticket

Contact our world-class support team and tell us what’s happening.

Create a ticket
Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.