get_drive_file_content
Download a Drive file and return its extracted text, supporting Google Workspace formats, Office docs, PDFs, and images.
Instructions
Download a Drive file and return its text (auto-extracting per type).
Use this when you need file text; for a URL to the raw bytes use get_drive_file_download_url, for metadata use get_file_metadata (in hosted clients) or list fields. Handles shared drives. Extraction: Google Docs/Sheets/Slides export to text/CSV; Office .docx/.xlsx/.pptx unzipped and parsed; PDFs extracted with pypdf (scanned PDFs fall back to a download hint); images returned as base64 for multimodal clients; other files decoded as UTF-8 or flagged binary. Requires the drive.readonly OAuth scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| file_id | Yes | Drive file ID from search_drive_files, list_drive_items, or the URL like drive.google.com/file/d/<id>/view. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |