> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valmi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets

> This guide describes how to configure Google Sheets OAuth for use with the valmi.io UI.

# Setting Up Google Sheets for OAuth

## Step 1: Create a Google Project

1. **Sign in to Google Cloud Console**: Visit the [Google Cloud Console](https://console.cloud.google.com/) and sign in using your Google account credentials.
2. **Create New Project**: Click on "Select a project" > "New Project".
3. **Enter Project Details**: Provide a name for your project (e.g., "valmi-io") and click "Create".
4. **Enable Sheets API**: In the dashboard, navigate to "APIs & Services" > "Library". Search for "Google Sheets API" and enable it for your project.

## Step 2: Configure OAuth Consent Screen

1. **OAuth Consent Screen**: In the Google Cloud Console, navigate to "APIs & Services" > "OAuth consent screen".

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/google_ads/consent-screen.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=cf46f6006b4c06bdd7b7358dd0d9f093" alt="Google Sheets Consent Screen" width="2764" height="1555" data-path="images/oauth/google_ads/consent-screen.png" />

2. **User Type**: Choose the appropriate user type for your application (Internal or External).
3. **Application Name**: Enter the name of your application (e.g., "valmi.io").
4. **Scopes**: Add the required OAuth scopes for your integration:
   * `https://www.googleapis.com/auth/userinfo.profile`
   * `https://www.googleapis.com/auth/userinfo.email`
   * `https://www.googleapis.com/auth/spreadsheets`
5. **Authorized Domains**: Add your application's domain to the authorized domains list.
6. **Save**: Click "Save" to save the OAuth consent screen settings.

## Step 3: Create OAuth Client ID

1. **Credentials**: In the Google Cloud Console, navigate to "APIs & Services" > "Credentials".
2. **Create Credentials**: Click "Create credentials" > "OAuth client ID".

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/google_ads/create-credentials.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=f0a590b8dcb9c1fa8af9567cbd4f07c5" alt="Google Sheets Create Credentials" width="2767" height="1555" data-path="images/oauth/google_ads/create-credentials.png" />

3. **Application Type**: Select "Web application" as the application type.
4. **Authorized Redirect URIs**: Add the redirect URI where Google will send users after authorization. Use the following format: `https://your-host/api/oauth2/redirect/google`.

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/google_ads/create-oauth.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=6850d05387d8a4d7afbe17aa41c3ea8a" alt="Google Sheets Create OAuth" width="2764" height="1555" data-path="images/oauth/google_ads/create-oauth.png" />

5. **Save**: Click "Save" to create the OAuth client ID.
6. **Copy Client ID and Client Secret**: Your Client ID and Client Secret will be displayed. Copy them for use in valmi.io.

## Step 4: Configure Google Sheets OAuth in valmi.io

1. **Access Configuration**: In your application, navigate to the sidebar and select "CONFIGURE APPS".

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/configure-apps.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=d3ff5e79e10c8db6c98f068b97e4f07c" alt="Configure Apps Selection" width="2783" height="1566" data-path="images/oauth/configure-apps.png" />

2. **Select Google Sheets OAuth Application**: Find the Google Sheets OAuth application from the list of available applications and select it.

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/google_sheets/selection.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=62b3c08c7e9e7caa9b346ec7593563a5" alt="Google Sheets Selection" width="2762" height="1552" data-path="images/oauth/google_sheets/selection.png" />

3. **Enter Credentials**: Provide the Google Client ID and Client Secret that you obtained earlier into the input fields.

<img src="https://mintcdn.com/valmiio/bPFiBTd5Bq3oEneR/images/oauth/google_sheets/config.png?fit=max&auto=format&n=bPFiBTd5Bq3oEneR&q=85&s=9b012e4a5ce559dd122cc67679356868" alt="Google Sheets OAuth Configuration" width="2769" height="1558" data-path="images/oauth/google_sheets/config.png" />

4. **Save Configuration**: Click "Save" or "Update" to save the configuration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.