Skip to content

Feature request: drive.exportFile — export Docs/Sheets/Slides as PDF, DOCX, XLSX, PPTX, CSV #398

@matheusrmorgado

Description

@matheusrmorgado

Problem

drive.downloadFile deliberately refuses Google Workspace files and redirects the model to docs.getText / sheets.getText / slides.getText:

This is a Google Doc. Direct download is not supported. Please use the 'docs.getText' tool...

That covers reading the content, but there is no way to produce the artifact users actually ask for: "save this doc as PDF", "export the spreadsheet as xlsx", "give me the deck as pptx". Today the model has to tell the user to do it manually in the UI.

Proposal

drive.exportFile(fileId, format, localPath) — a thin wrapper over files.export:

  • format: friendly enum (pdf, docx, xlsx, pptx, csv, txt, html, rtf, epub) mapped to the export MIME types, validated against the source file type by the API itself
  • localPath: same absolute-path convention as drive.downloadFile / slides.getSlideThumbnail
  • Read-only (readOnlyHint), fits the drive.read feature group; drive.readonly scope already covers files.export, so no consent change

Complements drive.downloadFile exactly where it punts today, and benefits Docs, Sheets and Slides at once.

I have a working implementation with Jest coverage ready to submit as a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions