Resolving Restricted Scopes Error When Connecting Google Account
If you’re encountering a "restricted scopes" error when trying to connect your Google account (especially with Gmail or Google Drive) to your module, don’t worry. This guide will help you navigate through the steps needed to fix this issue.
Step 1: Add New Connection
First, click on "Add." If you’re using a standard email account (like [email protected]
), this step is straightforward. However, for Gmail accounts (like [email protected]
), the process becomes a bit more involved.
You can name your connection whatever you’d like, but for the sake of this tutorial, I will name mine "V3." Next, navigate to "Advanced Settings," which is where you’ll need to find your Client ID and Client Secret.
Step 2: Access Google Cloud Console
To obtain the required credentials, visit the Google Cloud Console. You can quickly find it by searching "Google Cloud Console" on Google and clicking the first link. Once you’re on the console page, click on "Console."
Make sure you’re logged into the correct Gmail account. In the projects list, click on "New Project." You can name this project “Make V3 Test” or choose any name that suits your purposes. Click "Create" and wait for the project to be set up.
Step 3: Enable APIs
Once your project is ready, select it from the project menu. In the search bar within the Google Cloud Console, type "Google Drive API" and select it. Click "Enable."
Repeat this process for the "Gmail API" to enable it as well.
Step 4: Create Credentials
After enabling the APIs, navigate to "Credentials" in the sidebar. Click on "Configure Consent Screen" and choose "External" as the user type.
Fill out the app name (e.g., "Make") and your support email. For the authorized domains, type make.com
and add another domain as integromat.com
. You can easily copy and paste these from the comment section if necessary.
Next, add your email address in the appropriate field. Click on "Add or Remove Scopes" to incorporate the required scopes—select the Google Drive API scopes first, then do the same for the Gmail API scopes. Save your changes and click “Continue.”
Step 5: Add User and Continue
A crucial step is to add a user by inputting your email address again. If you skip this, the project won’t work. After this, you can click "Save and Continue."
Step 6: Create Client ID
Now, we will create the Client ID. Go to "Credentials" and click on "Create Credentials." For the type of application, choose “Web Application.”
Name your application (e.g., "Make"). You’ll need to input the redirect URIs. Here, I will provide a list in the description below that you can copy and paste.
Step 7: Copy Client ID and Secret Key
After creating the credentials, you will receive your Client ID and Client Secret. Copy these and return to the initial application where you need to enter them.
Step 8: Test the Connection
After inputting the Client ID and Secret, you may experience a brief delay (5 minutes to an hour) before the credentials take effect. However, if everything is set correctly, you can continue immediately.
Click "Continue" and follow through the subsequent settings to verify the connection.
Step 9: Create a Draft Email
Once successfully connected, you can start creating a draft email. For example, you could set the folder to "Drafts," title it "This is a test draft," and in the body, write "Hi, my name is test."
After pressing "OK," you can run the module to see if it executes successfully. You can do this either by double-clicking or clicking "Run" at the bottom.
Step 10: Verify Email Draft
After executing the module, check your Gmail account to confirm that the draft has been created successfully. You should see a draft titled "This is a test draft" displaying the message you entered.
Conclusion
By following the steps laid out in this guide, you can easily resolve the restricted scopes error and successfully connect your Google account for Gmail and Google Drive.
If you found this tutorial helpful, please like and subscribe. For more resources and to keep up with new content, check back for my upcoming community where you can find more scenarios and coding examples to assist in your projects. Thank you for watching!