Step-by-Step Guide to Set Up Google Console Project for Google Sheets and Drive APIs
This guide walks you through creating a Google Cloud project, enabling the required APIs, obtaining the Client ID and Client Secret, and configuring test users to successfully authenticate with Google Sheets and Drive APIs.
Step 1: Create a Google Cloud Project
- Open your browser and go to the Google Cloud Console.
- Log in with your Google account.
- Click on the Select a project dropdown at the top of the page, then click on New Project.
- Provide the following details:
- Project Name: Enter a meaningful name (e.g., “Google Sheets API Integration”).
- Location: Leave it as “No organization” if you do not have an organization.
- Click Create. Google will redirect you to the project dashboard.
Step 2: Enable Google Sheets and Drive APIs
- While in your project dashboard, click the Navigation Menu (three horizontal lines in the top-left corner).
- Select APIs & Services > Library.
- In the API Library:
- Search for Google Sheets API, click on it, and then click Enable.
- Search for Google Drive API, click on it, and then click Enable.
Step 3: Configure the OAuth Consent Screen
- Go to APIs & Services > OAuth consent screen.
- Choose External as the user type and click Create.
- Fill out the following details:
- App Name: Enter a meaningful name (e.g., “FlowMattic Google Integration”).
- User Support Email: Enter your email address.
- App Logo: Optional, but you can upload a logo if desired.
- Authorized Domains: Add the following domain:
flowmattic.com
- Developer Contact Information: Enter your email address.
- Click Save and Continue.
Step 4: Add Scopes
- On the “Scopes” screen:
- Click Add or Remove Scopes.
- Select the following scopes from the list or manually add them:
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/drive
- Click Update and then Save and Continue.
Step 5: Add Test Users
- On the “Test Users” screen:
- Click Add Users.
- Enter the email addresses of the Google accounts you will use to test the integration (e.g., your own or any users who will authenticate the connection).
- You can add multiple email addresses, separated by commas or one per line.
- Click Save and Continue.
Important: Only users added here will be able to authenticate successfully. If you skip this step, Google will throw an error during authentication.
Step 6: Create OAuth 2.0 Credentials
- Go to APIs & Services > Credentials.
- Click on + Create Credentials and select OAuth Client ID.
- On the Create OAuth Client ID screen:
- Application Type: Select Web Application.
- Name: Enter a name for the credential (e.g., “Google Sheets OAuth”).
- Authorized Redirect URIs: Add the following callback URL:
https://api.flowmattic.com/oauth2/callback
- Click Create. Google will display your Client ID and Client Secret. Save these credentials securely.
Step 7: Configure FlowMattic Connect
- Go to the FlowMattic Connects form in your FlowMattic admin page.
- Click Connect New API button
- Fill in the following details:
- Connect Name: Enter a meaningful name (e.g., “Google Sheets – Custom”).
- Authentication Type: Select OAuth 2.0.
- Callback URL: Use
https://api.flowmattic.com/oauth2/callback
. - Auth URL: Use
https://accounts.google.com/o/oauth2/v2/auth
. - Access Token URL: Use
https://oauth2.googleapis.com/token
. - Client ID: Paste the Client ID from Google Cloud Console.
- Client Secret: Paste the Client Secret from Google Cloud Console.
- Scopes: Enter the following (space-separated):
https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive
- State: Leave blank (optional).
- Authorization Token Name: Set to Bearer.
- Client Authentication: Select Send as Basic Auth header.
- Click Save Connect & Authenticate.
Step 8: Authenticate and Generate Tokens
- After saving the connection, FlowMattic will redirect you to Google’s login page.
- Log in with one of the test user accounts you added earlier.
- Grant permissions for the specified scopes.
- Upon successful authentication, FlowMattic will store the Access Token and Refresh Token for future use in the Connect
Additional Notes
- Token URL and Auth URL:
- These URLs are already pre-configured as:
- Auth URL:
https://accounts.google.com/o/oauth2/v2/auth
- Token URL:
https://oauth2.googleapis.com/token
- Auth URL:
- These URLs are already pre-configured as:
- Token Expiry:
- Access tokens expire after a limited time. FlowMattic will automatically renew them using the refresh token.
With this guide, you should now be able to authenticate successfully and integrate Google Sheets integration into FlowMattic without errors!