Skip to content

Connecting Your Google Drive Account to Unli.ai

Prerequisites

Before connecting your Google Drive account, ensure you have:

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

Obtaining Google API Credentials

Follow these steps to get your Google API credentials:

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing project.
  3. Enable the Google Drive API:
    • Navigate to APIs & Services > Library.
    • Search for Google Drive API and enable it.
  4. Configure OAuth consent screen:
    • Under APIs & Services, go to OAuth consent screen.
    • Choose External (if allowing public access) or Internal (if restricted to your organization).
    • Fill in the necessary details.
    • In the Scopes section, add the following scopes:
      https://www.googleapis.com/auth/drive.readonly
      https://www.googleapis.com/auth/userinfo.profile
      https://www.googleapis.com/auth/userinfo.email
      https://www.googleapis.com/auth/drive.file
      openid
      https://www.googleapis.com/auth/drive.metadata.readonly
      https://www.googleapis.com/auth/drive
  5. Create OAuth 2.0 credentials:
    • Go to Credentials > Create Credentials > OAuth Client ID.
    • Set Application Type to Web Application.
    • Add Authorized JavaScript Origins:
      • https://app.unli.ai
    • Add Authorized Redirect URIs:
      • https://app.unli.ai
      • https://app.unli.ai/datasources/google-drive/callback
    • Click Create, then save your Client ID and Client Secret.

Connecting Google Drive to Unli.ai

Once you have your Google credentials:

  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 authorize Unli.ai to access your Google Drive.

  1. Accept the permissions prompt to allow Unli.ai access.
  2. Upon completion, you will be redirected back to your Project Page.

Selecting Files and Folders from Google Drive

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

Ingestion Process

Once files are selected and you proceed:

  • 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!