Skip to content

Connect Google Drive

Add files from Google Drive to the knowledge base, allowing the Agent to reference your documents, spreadsheets, and presentations.

Prerequisites

Before starting, please understand the basic concepts and folder structure of the knowledge base. If you haven't created a knowledge base folder yet, please refer to Knowledge Base Overview.

Applicable Scenarios

After adding Google Drive files to the knowledge base, you can:

  • Let the Agent reference documents in Google Docs
  • Let the Agent read data from Google Sheets
  • Integrate content from Google Slides into the knowledge base

Connection Steps

Step 1: Enter Knowledge Base and Select Folder

  1. Enter Knowledge Base Page

    • In your workspace, click "Knowledge Base" in the left menu
    • Select the "Folders" tab
  2. Select or Create Folder

    • Select an existing folder or create a new folder
    • Folders are used to organize and categorize your documents
  1. Click "Add File"

    • In the folder, click the "Add File" button
    • You'll see menu options
  2. Select "Link Another Google Account"

    • If this is your first time linking a Google account, the authorization process will start directly
    • If you've already linked a Google account, you can:
      • Click the "×" next to the linked account to link another account
      • Or directly click the linked account to select files

Account Limitation

  • Each account can only link one Google Drive account.
  • If you want to link a different Google Drive account, you need to go to the "External Connections" tab to delete the existing connection first, or click the "×" next to the linked account to link another account.

Step 3: Authorize Google

After selecting "Link Another Google Account," you'll be directed to Google's authorization page.

  1. Select your Google account
  2. Review permission requests
  3. Click "Allow" to authorize

Security Notice

Codeer.ai will only read data you authorize and will not modify or delete any content.

Step 4: Select Files

After authorization completes, Google Drive's file picker will open:

  1. Browse Your Google Drive

    • You can browse your entire Google Drive
    • Including "My Drive" and "Shared Drives"
  2. Select Files You Want to Add to Knowledge Base

    • You can select multiple files at once
    • Only files can be selected, folders cannot be selected
    • Supported file types include: Google Docs, Google Sheets, Google Slides, PDF, .docx, .xlsx, .pptx, .txt, .md, .csv, etc.
  3. Click Confirm to Complete Selection

    • Selected files will immediately be added to the knowledge base folder you just selected
    • Files will appear in the folder list

Selection Recommendation

It's recommended to only select relevant files, avoiding adding too much irrelevant content, which can improve the accuracy of Agent responses.

Supported File Types

Type Supported Formats
Documents Google Docs, .docx, .txt, .md
Spreadsheets Google Sheets, .xlsx, .csv
Presentations Google Slides, .pptx
PDF .pdf

Usage

After files are added to the knowledge base, you need to configure the knowledge base tool in the Agent first before the Agent can use these files.

Configure Knowledge Base Tool

  1. Enter Agent Editor
  2. Click "Add Tool" in the "Tools" section
  3. Select "Knowledge Base"
  4. Select the knowledge base folder containing Google Drive files
  5. Set "When to Use" instructions

Detailed Setup Steps

Use in Conversations

After configuration, when asking questions:

You: According to the "Product Specification," what are the requirements for this feature?

AI: According to "Product Specification.docx" in your knowledge base, the feature requirements include...
[Shows citation source: Knowledge Base > Product Specification.docx]

Common Questions

Can I select an entire folder?

No. Google Picker can only select files, not entire folders.

If you need to add multiple files from a folder:

  1. Browse to that folder in Google Picker
  2. Select multiple files at once (hold Ctrl/Cmd key to multi-select)
  3. Click confirm to complete selection
Can shared drives be connected?

Yes. Any files you have access to can be selected and added to the knowledge base.

In Google Picker, you can browse files in "Shared Drives" and select files you have permission to access to add to the knowledge base.

Will the knowledge base automatically update after files in Google Drive are updated?

No. Data in the knowledge base is a static snapshot and will not automatically sync with Google Drive updates.

If you update a file in Google Drive, you need to:

  1. Go to the knowledge base page
  2. Find the old version of the file and click delete
  3. Again click "Add File" → "Link Another Google Account" (or click the linked account)
  4. In Google Picker, reselect the updated file

This way, the Agent can reference the latest content.

How do I link another Google account if I've already linked one?

If you want to link a different Google Drive account:

  1. Go to the knowledge base page and select the "External Connections" tab
  2. Find your currently connected Google Drive account
  3. Click the menu (⋮) icon on the right and select "Delete"
  4. Return to the "Folders" tab and reconnect the new Google account

Alternatively, if you've already linked a Google account, you can directly click that account to select files without needing to reconnect.

Will large files affect performance?

The system will automatically handle large files, but it's recommended:

  • Only select necessary files, avoiding adding too many large files
  • If files are too large, consider organizing or splitting them first
  • Regularly check files in the knowledge base and remove files that are no longer needed
Can I link multiple Google accounts simultaneously?

No. Each account can only link one Google Drive account.

If you need to access files from multiple Google accounts, you can:

  1. First link the first Google account and select needed files
  2. Delete the connection
  3. Link the second Google account and select needed files
  4. Repeat this process

Alternatively, share files from multiple Google accounts to the same Google account, then link that account.

Next Steps