export_doc_to_pdf
Export a Google Doc to PDF and save it directly to Google Drive. Specify document ID, optional filename and folder.
Instructions
Export a Google Doc as PDF and save the PDF back into Drive.
Side effects: creates a new PDF file in Drive (separate file from the Doc — the Doc itself is untouched). To download bytes without saving use get_drive_file_download_url with export_format="pdf". To convert the source to DOCX or other formats use get_drive_file_download_url. Requires both docs (read) and drive.file OAuth scopes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| document_id | Yes | Google Doc ID (must be a native Doc — .docx stored in Drive is rejected). | |
| pdf_filename | No | Name for the generated PDF. Defaults to "<original>_PDF.pdf". ".pdf" extension is auto-appended. | |
| folder_id | No | Drive folder to save the PDF into. Defaults to My Drive root. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |