Skip to content

Initial Setup: Google Cloud

Shivam Saini edited this page Sep 8, 2025 · 6 revisions

Initial Setup: Google Cloud

The first step is to configure your Google Cloud project to allow the Frappe app to access the Gmail API.

Step 1: Create a Google Cloud Project

If you don't have one, create a new project with a suitable name.

image1

Step 2: Set Up the OAuth Consent Screen

Navigate to the OAuth Consent Screen setup.

  • User Type: Choose Internal (for Google Workspace organizations) or External (requires app verification).

  • Fill in the required fields: App Name, Support Email, and your Authorized Domain.

image2

Step 3: Enable the Gmail API

Visit the Gmail API Marketplace and click Enable.

image16

Step 4: Add Required Scopes

Under the consent screen settings, click Add or Remove Scopes. You must add the https://www.googleapis.com/auth/gmail.readonly scope for the app to function.

image

Step 5: Create OAuth Credentials

Go to Google API Credentials.

  • Click Create Credentials > OAuth Client ID.

  • Configure the credentials:

    • Application Type: Web application

    • Authorized JavaScript Origins: Add your Frappe app's base URL (must use HTTPS).

    • Authorized Redirect URIs: Add <BASE_URL>/api/method/frappe_gmail_thread.api.oauth.callback

image5 image11

Save the generated Client ID and Client Secret. You will need these for the next setup steps.