Download File Content
download_file_contentDownloads files from Google Drive. Exports native Google Docs, Sheets, and Slides to formats like PDF, DOCX, XLSX, CSV, or PPTX, while other files download in original format.
Instructions
Downloads a Google Drive file and returns its raw bytes as a base64-encoded blob.
For Google native files (Docs, Sheets, Slides), exports to a useful format:
Google Docs -> PDF (default) or DOCX if export_format='docx'
Google Sheets -> XLSX (default), PDF if export_format='pdf', or CSV if export_format='csv'
Google Slides -> PDF (default) or PPTX if export_format='pptx'
For other files, downloads the original file format.
Size limit: DOWNLOAD_FILE_CONTENT_MAX_MB env var (default 25 MB). Files larger than the limit return an error pointing to read_file_content for text extraction, or a Drive shareable link as a fallback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | No | user@gmail.com | |
| fileId | Yes | The Google Drive file ID to download. | |
| export_format | No | Optional export format for Google native files. Options: 'pdf', 'docx', 'xlsx', 'csv', 'pptx'. |