Overview
The Google Drive integration lets users connect their Google Drive so Alysio can search and read their files on their behalf. Users can ask Alysio to find files by name or type, open preview links, list recently modified or shared-with-me files, export document content (e.g. Google Docs, Sheets, Slides, PDFs), and save Excel/Sheets data for analysis—all in natural language. The integration uses the user’s connected Google account and only reads or exports content; it does not create, edit, or delete files in Drive.
Supported capabilities / objects
- Files — Search files (by query, MIME type, folder, modified time), get file metadata (name, size, owners, modified time), get preview (webView) link.
- Lists — List files shared with the user; list recently modified files (optionally filtered by time).
- Content export — Export Google Workspace files (Docs, Sheets, Slides) and PDFs to readable text; supported formats and size limits apply (e.g. 5MB limit for export).
- Excel/Sheets for analysis — Save Excel or Google Sheets content to a local table format for use with the
execute_sql_query (DuckDB) tool.
Authentication
Method: OAuth 2.0 (Google). The MCP sends requests using a Bearer token and a credential ID that identifies the user’s connected Google account.
Redirect URI: Configured when the Google Drive integration is set up in Alysio.
Token handling
- OAuth tokens for the connected Google account are stored securely and refreshed automatically.
- Each user/tenant has their own credential; the MCP sends the appropriate credential ID with each request so calls are isolated per connection.
- On disconnect, that credential is no longer used and Google Drive tools will not be available for that user until they reconnect Google Drive.
Required scopes
https://www.googleapis.com/auth/drive.readonly
Alternatively, https://www.googleapis.com/auth/drive (full read/write) can be used; only read and export are used by the current tools.
Scope justification
| Scope | Purpose |
|---|
| drive.readonly | Search files, get metadata and preview links, list shared-with-me and recent files, export Docs/Sheets/Slides/PDF content, and save Excel/Sheets for analysis. |
Connection required: Users must connect Google Drive in Alysio before Drive tools work. If the connection is missing or expired, they may need to re-authorize in Settings → Integrations.
Export limits: Export has a 5MB file-size limit; larger files return an error. Only certain MIME types are supported for content export (Google Docs, Sheets, Presentations, PDF).
The Google Drive MCP exposes the following tools. Users can invoke these capabilities through natural language in Alysio.
| Tool | Description | Example user prompts |
|---|
googledrive_search_files | Searches Drive for files by keyword, name, MIME type, folder, or modified time and returns file list with metadata. | ”Find PDFs about QBR”, “Search my Drive for the sales deck.” |
googledrive_get_file_metadata | Returns metadata for a file by ID (name, size, owners, modified time, etc.). | ”Get details for file 1abc…”, “What’s the size of this file?” |
googledrive_get_preview_link | Returns the webViewLink (preview URL) for a file by ID. | ”Give me a link to open this document”, “Preview link for file 1abc…” |
googledrive_list_shared_with_me | Lists files that were shared with the user, ordered by when they were shared. | ”What’s been shared with me?”, “List files shared with me recently.” |
googledrive_list_recent_files | Lists recently modified files, optionally filtered by a timestamp. | ”What did I change recently in Drive?”, “Show my last 20 updated files.” |
googledrive_export_file_content | Exports and returns the text content of a supported file (Google Docs, Sheets, Slides, or PDF); 5MB limit. | ”Get the text from this Doc”, “Export the content of this PDF.” |
googledrive_save_excel_file_content | Saves Excel or Google Sheets content to a table (for use with execute_sql_query); requires a file ID and a simple name. | ”Save this spreadsheet as a table so we can analyze it”, “Load the QBR sheet and make it queryable.” |
App Behavior
- API calls are made on-demand only when the user asks something that requires Drive data or content (e.g. search, metadata, preview, list shared/recent, export, save Excel). There is no background sync; each request triggers the relevant Google Drive API call using the user’s OAuth credential.
Example flow
- User asks: “Find the proposal PDF in my Drive.”
- Alysio routes the request to the Google Drive MCP.
- The MCP calls
googledrive_search_files with a query and optionally mimeType=application/pdf.
- The request is sent to the Drive API using the user’s stored OAuth credential.
- The MCP returns the file list; Alysio presents the results (and can follow up with metadata or preview link if the user asks).
Troubleshooting
Common issues
- Missing or expired connection — User sees errors or no Drive data. Fix: Reconnect Google Drive in Settings → Integrations (re-authorize with Google).
- 401 Unauthorized — Token invalid or revoked. Fix: Re-authorize the integration in Settings → Integrations.
- 403 Forbidden — Often due to insufficient OAuth scopes. Fix: Ensure the Google Drive integration has the required scope (e.g.
drive.readonly).
- File size limitation / Export failed — Export is limited to 5MB and to supported types (Docs, Sheets, Slides, PDF). Fix: Use a smaller file or a supported type; for large spreadsheets, consider
googledrive_save_excel_file_content for specific sheets.
- Unsupported file type for export — Only Google Workspace native types and PDF are supported for
googledrive_export_file_content. Fix: Use preview link to open the file in the browser, or (for Excel/Sheets) use googledrive_save_excel_file_content.
- Save Excel requires DuckDB —
googledrive_save_excel_file_content is intended to be followed by execute_sql_query for analysis. Fix: Ensure the user flow asks Alysio to analyze the saved data with SQL if that’s the goal.
Support