Google Drive Integration
Connect Google Drive so Slateo 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 Slateo.
Prerequisites
You will need:
- A Google Cloud Platform (GCP) account
- Admin access to your Slateo organization
Get started
1. Create a GCP project
- Go to the Google Cloud Console.
- Click Select a project in the top bar, then New Project.
- Name the project (e.g., "Slateo Integration") and click Create.
- Make sure the new project is selected.
2. Enable the Google Drive API
- In the GCP Console, navigate to APIs & Services > Library.
- Search for Google Drive API.
- Click on it and press Enable.
3. Configure the OAuth consent screen
- Go to APIs & Services > OAuth consent screen.
- Choose Internal if your organization uses Google Workspace, or External for testing.
- Fill in the required fields:
- App name: e.g., "Slateo"
- User support email: your email
- Developer contact email: your email
- On the Scopes page, add:
https://www.googleapis.com/auth/drive.readonlyhttps://www.googleapis.com/auth/userinfo.email
- Complete the remaining steps and click Save.
4. Create OAuth credentials
- Go to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Select Web application as the application type.
- Under Authorized redirect URIs, add your Slateo callback URL:
- For production:
https://yourdomain.com/redirect/api/google-drive/auth/callback - For local development:
http://localhost:4321/api/google-drive/oauth/callback
- For production:
- Click Create and copy the Client ID and Client Secret.
5. Configure environment variables
Add the following to your Slateo server environment:
GOOGLE_DRIVE_CLIENT_ID=your-client-id
GOOGLE_DRIVE_CLIENT_SECRET=your-client-secret
6. Connect in Slateo
- Open the Slateo Admin panel.
- Go to Settings > Integrations.
- Find Google Drive and click Connect Google Drive.
- You will be redirected to Google to authorize access.
- After authorizing, you will be redirected back to Slateo 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
Slateo 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 type | Content format |
|---|---|
| Google Docs | Plain text |
| Google Sheets | CSV |
| Google Slides | Plain text |
| Other files | Not exported (metadata only) |
Disconnecting
- Go to Settings > Integrations in the Slateo Admin panel.
- Click Disconnect on the Google Drive integration.
- 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 drive.readonly scope, which provides access to all files the authorizing user can see. Verify the file is accessible to the Google account that authorized the integration.
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 Slateo 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?
Slateo 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.