Skip to main content

Google Drive

Connect a Google account so assistants can list, search, read, and (when you allow it) create files in that Drive. Google Drive is a per-member connection: each workspace member connects their own Google account. Workspace admins enable the feature; members authorize their own OAuth grants.

This is separate from files you upload into Gravity Rail. Drive stays in Google; assistants search it at request time. Nothing is copied into the workspace unless you ask an assistant to read a specific file and work with its contents.

Before You Start

You'll need:

  1. The Google Drive feature enabled on your workspace. If you don't see Google Drive in the App Connections directory, ask your Gravity Rail administrator to turn on the Drive feature.
  2. A Google account with access to the files you want assistants to find. You can connect more than one Google account if you work across several organizations.
  3. If the account is on Google Workspace, a domain admin must allow Gravity Rail first. Personal @gmail.com accounts do not need this. See Google Workspace Accounts.

Connecting Your Google Account

  1. Go to App Connections and open the Directory tab.
  2. Find Google Drive (Google category) and click Install.
  3. Click Connect — you'll be redirected to Google's authorization page.
  4. Sign in with the Google account whose Drive you want assistants to search.
  5. Review and approve the requested permissions (see Required Permissions below).
  6. You'll be redirected back to your workspace. The new connection appears on the Active tab under Platform Integrations.

Connecting Multiple Google Accounts

  1. On the Active tab, open the Google Drive connection.
  2. Click Add account and repeat the OAuth flow with the second account.
  3. Assistants see all connected accounts when listing available connections.

Connecting During a Chat

If the workspace has inline connect enabled and you don't yet have a Google Drive connection, an assistant may prompt you to connect from the chat. Click the Connect Google Drive button to launch the OAuth flow without leaving the conversation.

Required Permissions

Gravity Rail requests the following Google OAuth scopes when you connect:

ScopeWhy it's needed
drive.readonlyList and search files the connected account can already open
drive.fileCreate Google Docs or text files the assistant makes on your behalf
userinfo.email, userinfo.profile, openidIdentify which Google account is connected

The assistant's tools follow the Drive ability's access mode in Gravity Rail. A read-only ability cannot create or overwrite Drive files.

What Assistants Can Do

Once your Google account is connected, assistants with the integration:google_drive ability can:

ToolWhat it does
List connectionsShow which Google accounts you have connected
List Drive filesSearch Drive by name or content, optionally filtered by file type
Read a fileRead the text of a Google Doc, spreadsheet (as CSV), or text file
Create a fileCreate a Google Doc or plain-text file (read-write access mode only)
Reconnect accountRe-authorize a connected account if the token has expired

Assistants can only see files the connected Google account can already open — including files shared with that account.

Managing Your Connection

Viewing Connected Accounts

Go to App ConnectionsActive tab and open Google Drive. Each row shows the connected Google email address and connection status.

Reconnecting an Expired Account

If your OAuth token expires or is revoked, the connection shows a Reauthorize Required badge:

  1. Open the Google Drive connection on the Active tab.
  2. Click Reauthorize next to the affected account.
  3. Complete the Google OAuth flow again.

Alternatively, ask an assistant to reconnect: "Reconnect my Google Drive account."

Removing an Account

  1. Open the Google Drive connection on the Active tab.
  2. Click the action menu next to the account you want to remove.
  3. Choose Disconnect.

To remove the integration entirely, choose Delete from the connection's action menu. This removes all connected Google accounts and their stored tokens.

Also revoke from Google. Removing the connection in Gravity Rail deletes our copy of the OAuth token, but Google keeps its own record of the grant. To fully revoke access, visit myaccount.google.com/permissions and remove the Gravity Rail app.

Troubleshooting

"This app is blocked" or admin_policy_enforced

The Google account is on a Workspace domain that blocks unverified third-party apps. Send Google Workspace Accounts to your Google Workspace admin and retry after they mark the Drive client as Trusted.

"Reauthorize Required" badge

Google has revoked or expired the access token. This happens when:

  • The token hasn't been used for six months (Google's inactivity policy)
  • You changed your Google account password
  • You manually revoked access in Google's account settings
  • An admin in your Google organization restricted third-party app access

Open the connection and click Reauthorize to re-run OAuth.

Assistant can't find a file

  • Confirm the file is accessible to the Google account you connected.
  • Try a more specific name or phrase in your prompt.
  • A file shared with you in the last minute may not appear in Drive search yet.

"Google Drive not available" or missing from the Directory

The Drive feature is not enabled on your workspace. Ask your Gravity Rail administrator to enable it.