Google Drive Integration

Connect Google Drive so Vuon agents can read Google Docs, Sheets, and Slides directly from your workspace. This guide walks through creating a GCP project, configuring OAuth, and connecting in Vuon.

What Vuon accesses

Vuon asks Google for one permission, drive.file, and refuses a connection that also holds the broader drive or drive.readonly permission. With drive.file, Google limits Vuon to files it created and files you picked for it, and Vuon reads only files directly inside the folder you choose when you connect.

  • Reads: names, types, links and modified times of files in that folder, and the text of Google Docs and Slides, Google Sheets as CSV or cell values, and plain-text files. Other file types show metadata only.
  • Writes: when you ask, an agent can change cells in Google Sheets in that folder and create new spreadsheets there. Each edit returns the values it replaced.
  • Stores: the connected Google address, the folder's id and name, and encrypted credentials. File content is not kept with the connection; what an agent reads becomes part of that chat.
  • Disconnect: deletes the stored credentials and folder choice. It does not ask Google to revoke the grant, so also remove Vuon at myaccount.google.com/permissions if you want Google's access to end. A connection made before folder selection must be reconnected, with a folder chosen, before Vuon uses it.

For how this data is used, shared and retained, see Data from connected accounts and Google user data in the privacy policy. The sections below are a setup guide for self-hosted deployments.

Prerequisites

You will need:

  • A Google Cloud Platform (GCP) account
  • Admin access to your Vuon organization

Get started

1. Create a GCP project

  1. Go to the Google Cloud Console.
  2. Click Select a project in the top bar, then New Project.
  3. Name the project (e.g., "Vuon Integration") and click Create.
  4. Make sure the new project is selected.

2. Enable the Google Drive API

  1. In the GCP Console, navigate to APIs & Services > Library.
  2. Search for Google Drive API.
  3. Click on it and press Enable.

3. Configure the OAuth consent screen

  1. Go to APIs & Services > OAuth consent screen.
  2. Choose Internal if your organization uses Google Workspace, or External for testing.
  3. Fill in the required fields:
    • App name: e.g., "Vuon"
    • User support email: your email
    • Developer contact email: your email
  4. On the Scopes page, add https://www.googleapis.com/auth/drive.file.
  5. Complete the remaining steps and click Save.

4. Create OAuth credentials

  1. Go to APIs & Services > Credentials.
  2. Click Create Credentials > OAuth client ID.
  3. Select Web application as the application type.
  4. Under Authorized redirect URIs, add your Vuon callback URL:
    • For production: https://yourdomain.com/redirect/api/google-drive/auth/callback
    • For local development: http://localhost:4321/api/google-drive/oauth/callback
  5. Click Create and copy the Client ID and Client Secret.

5. Configure environment variables

Add the following to your Vuon server environment:

GOOGLE_DRIVE_CLIENT_ID=your-client-id
GOOGLE_DRIVE_CLIENT_SECRET=your-client-secret

6. Connect in Vuon

  1. Open the Vuon Admin panel.
  2. Go to Settings > Integrations.
  3. Find Google Drive and click Connect Google Drive.
  4. You will be redirected to Google to authorize access.
  5. After authorizing, you will be redirected back to Vuon with the integration active.

Using Google Drive content

Once connected, you can use Google Drive content in several ways:

In the context menu

  • Click the @ button or type @ in the chat input to open the context menu.
  • Select Google Drive to search for files by name.
  • Paste a Google Drive URL directly to auto-resolve the file.

Agent tools

Vuon agents have access to two Google Drive tools:

  • Read Google Drive Doc — reads a Google Docs document, Sheets spreadsheet, or Slides presentation and returns its content as text.
  • Search Google Drive — searches your connected Google Drive for files matching a query.

Supported file types

File typeContent format
Google DocsPlain text
Google SheetsCSV
Google SlidesPlain text
Other filesNot exported (metadata only)

Disconnecting

  1. Go to Settings > Integrations in the Vuon Admin panel.
  2. Click Disconnect on the Google Drive integration.
  3. This removes the stored OAuth tokens. You can reconnect at any time.

Troubleshooting

"No refresh token received"

This can happen if you previously authorized the app. Go to Google Account Permissions, revoke access for the app, and reconnect.

Files not appearing in search

The integration uses the drive.file scope and reads only files directly inside the folder chosen when connecting. Verify the file is in that folder, not in a subfolder, and that the Google account that authorized the integration can open it.

OAuth redirect errors

Ensure your authorized redirect URI in GCP matches exactly. Check for trailing slashes or protocol mismatches.


FAQ

Can I connect multiple Google accounts?

Currently, each Vuon organization can connect one Google account at a time. If you need to switch accounts, disconnect the current integration and reconnect with a different account.

What file types are supported?

Vuon supports Google Docs (plain text), Google Sheets (CSV), and Google Slides (plain text). Other file types will show metadata only but content won't be exported.

Can I access files from shared drives?

Yes, if the authorizing user has access to shared drives, those files will be available through the integration.


Was this page helpful?