import_to_google_doc
Convert a source file (markdown, docx, txt, html, rtf, odt) into a native Google Doc with preserved formatting via inline text, file path, or URL.
Instructions
Convert a source file into a native Google Doc on upload.
Drive performs the conversion server-side, preserving headings, lists, inline formatting, tables, etc. Use this (not create_drive_file) when you want a real Google Doc editable in the web UI. For adding content to an existing Doc use insert_doc_markdown or insert_doc_elements. Requires the drive.file OAuth scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| file_name | Yes | Display name for the resulting Google Doc (extension is stripped). | |
| content | No | Inline text for text formats (md, txt, html). Mutually exclusive with file_path and file_url. | |
| file_path | No | Local path or file:// URL to a binary source (docx/odt/rtf). Path safety validated. | |
| file_url | No | http:// or https:// URL to stream the source from. SSRF-protected with size limits. | |
| source_format | No | Override for format detection: "md"/"markdown", "docx", "txt", "html", "rtf", "odt". Auto-detected from file_name extension or content heuristics when omitted. | |
| folder_id | No | Parent folder ID. Default "root". | root |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |