insert_doc_image
Insert an image into a Google Doc from a public Drive file ID or an HTTPS image URL. Supports PNG, JPEG, and GIF.
Instructions
Insert an image into a Google Doc from Drive or an HTTPS URL.
When image_source is a Drive file ID, its sharing MUST allow "Anyone with the link" — check with check_drive_file_public_access first. HTTPS URLs must serve image bytes directly (no redirects, login walls, or signed URLs). PNG/JPEG/GIF supported. Index 0 is auto-bumped to 1. Requires both docs and drive.readonly OAuth scopes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | The user's Google email address (authenticated account). | |
| document_id | Yes | Target document ID. | |
| image_source | Yes | Drive file ID (non-URL string) or public HTTPS image URL. Drive IDs are auto-converted to https://drive.google.com/uc?id=<id>. | |
| index | Yes | 0-based insertion index from inspect_doc_structure. 0 auto-bumped to 1. | |
| width | No | Image width in points. 0 or omitted = auto-size. | |
| height | No | Image height in points. 0 or omitted = auto-size. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |