Skip to content

Connecting Your Google Drive Account to Unli.ai

Prerequisites

Before connecting your Google Drive account to Unli.ai, ensure you have the following:

  1. Google API Credentials:

    • Google API Key
    • Google Client ID
    • Google Client Secret
  2. A configured vector store in your project (e.g., Pinecone).


Setting Up Your Google Cloud Project and Obtaining API Credentials

1. Create a Google Cloud Project

To begin, set up your Google Cloud project and configure OAuth:

  1. Visit the Google Cloud Console.
  2. Create a new project or select an existing one.

2. Enable Required APIs

In your Google Cloud Console, enable the following APIs:

  • Google Drive API
  • Google Docs API
  • Google Picker API

To enable them:

  1. Go to APIs & Services > Library.
  2. Search for each API and enable them.

Configure the OAuth consent screen based on your account type:

  • Workspace/Enterprise Users:
    Choose Internal for the user type. This is only visible to users within your organization and does not require verification, allowing for faster setup.

  • Personal/Free Accounts:
    Choose External for the user type. This option is available to any Google user. However, if you plan to make your app publicly available, you'll need to go through the verification process. Until then, your app will be limited to test users.

Fill out the required app information and add the following OAuth scopes:

  • https://www.googleapis.com/auth/drive.file (Read selected files)
  • https://www.googleapis.com/auth/userinfo.profile (View basic profile)
  • openid (Authenticate users)
  • https://www.googleapis.com/auth/drive.readonly (Read access to files)
  • https://www.googleapis.com/auth/drive.metadata.readonly (Read metadata of files)
  • (optional) https://www.googleapis.com/auth/drive (Full access to Google Drive)

4. Create OAuth 2.0 Credentials

Create the OAuth credentials for your application:

  1. Go to Credentials > Create Credentials > OAuth 2.0 Client ID.
  2. Set Application Type to Web Application.
  3. Add the following Authorized JavaScript Origins:
    • https://app.unli.ai
  4. Add the following Authorized Redirect URIs:
    • https://app.unli.ai
    • https://app.unli.ai/datasources/google-drive/callback
  5. Click Create and note down your Client ID, Client Secret, and API Key.

Connecting Google Drive to Unli.ai

Once you have your Google API credentials, follow these steps to connect Google Drive to Unli.ai:

  1. Go to your Unli.ai Project Settings.
  2. Navigate to Datasources > Google Drive.
  3. Enter your Google API Key, Client ID, and Client Secret in the provided fields.
  4. Click Continue.

You will be redirected to Google's authorization page.

  1. Accept the permissions prompt to grant Unli.ai access to your Google Drive.
  2. After authorization, you will be redirected back to your Project Page.

Selecting Files and Folders from Google Drive

To select files and folders from Google Drive:

  1. Click on the Google Drive datasource you added.
  2. Click Select Files.
  3. Choose the files and/or folders you wish to ingest:
    • Files: Select individual files you want to ingest.
    • Folders: Please note the following folder selection constraints:
      • Maximum depth of 5 levels.
      • Maximum 50 pages for personal plans.
      • Maximum 500 pages for professional plans.
  4. Click Continue.

Ingestion Process

Once you have selected the files or folders:

  • The ingestion process will begin.
  • Upon completion, each ingested file and folder will be marked as successfully processed.

Your Google Drive documents are now integrated into your Unli.ai project for AI-powered knowledge retrieval!