# Google Authentication App

#### Step 1: Create a Google Cloud Project and Enable APIs

1. Go to the Google Cloud Console ([https://console.cloud.google.com/](https://console.cloud.google.com/?authuser=1)).
2. Select an existing project or click "Create Project" in the top left to set up a new project for your application (e.g., "Flowmate Google Integration").
3. Navigate to the Dashboard and use the search bar to find and Enable the "Google People API" and/or "Google Calendar API" (or any other API you need).

#### Step 2: Configure the OAuth Consent Screen

The consent screen is the page users see when they grant your application access to their Google account data.

1. In the left menu, navigate to "APIs & Services" and then to "OAuth consent screen".
2. Select the User Type:
   * External: (Recommended for most apps) – Your app can be used by any Google Account user.
   * Internal: Only for users within your Google Workspace organization.
3. Click "CREATE".
4. Configure the Page Details:
   * Application name: The name of your application (e.g., Flowmate).
   * User support email: An email address for user inquiries.
   * Authorized domains: Add the domains where your application is hosted (e.g., `help-flowmate.notion.site`).
5. Scopes: Add the necessary Scopes (permissions) that your application requires (e.g., `.../auth/userinfo.email` and `.../auth/userinfo.profile` for basic sign-in).
6. Test Users: For external apps in the Testing status, add at least one Test User (your own email address) before submitting the app for review.
7. Save the configuration.

#### Step 3: Create the OAuth 2.0 Client ID (Credentials)

Now, you will create the actual keys your application needs to communicate with Google.

1. In the left menu, navigate to "APIs & Services" and then to "Credentials".
2. Click "Create Credentials" at the top and select "OAuth client ID".
3. For the Application type, select "Web application" in most cases.
4. Give your Client ID a name (e.g., "FlowMate").
5. Crucial: Configure the Authorized URIs.
6. Click "CREATE".

<figure><img src="/files/Y7nvSElfmGnyobLmYTwR" alt=""><figcaption></figcaption></figure>

**Adding Authorized URIs**

These are the only addresses from which Google will accept your authentication requests. Errors here often result in "redirect\_uri\_mismatch" errors.

| Authorized JavaScript origins | The base URLs from which your application sends OAuth requests.                                        |
| ----------------------------- | ------------------------------------------------------------------------------------------------------ |
| Authorized redirect URIs      | The full endpoint (callback URL) where Google sends the authorization code after a successful sign-in. |

<figure><img src="/files/k6tMzDk5u8TScU6x5yCQ" alt=""><figcaption></figcaption></figure>

#### Step 4: Retrieve the Client ID and Client Secret

After creation, a dialog will display your credentials:

1. Client ID: This is your application's public key.
2. Client Secret: This is the secret key and must be handled securely. Never expose it to the client (browser)!

Save both of these values securely.

<figure><img src="/files/VMUBfIMeAuLZxqk2if0V" alt=""><figcaption></figcaption></figure>

#### Step 5: Add Client ID and Secret in FlowMate&#x20;

Add the retrieved Client ID and Client Secret in the configuration settings of FlowMate.

<figure><img src="/files/n3ESfqKlYJMsdMKawCqW" alt=""><figcaption></figcaption></figure>

Once these keys are saved, your Google App Authentication should be complete.

*If your app is intended for the general public, remember to change the OAuth consent screen from "Testing" to "In production" and complete the Google verification process.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flowmate.gitbook.io/flowmate-documentation/connectors/google/google-authentication-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
