Batch Update Document
batch_update_documentFull Description
Apply raw Google Docs batchUpdate requests to document content, not Drive file metadata.
Parameters (1 required, 4 optional)
requestsarrayRaw Google Docs API documents.batchUpdate request objects for editing document content. Each list item must set exactly one request type key such as insertText, updateTextStyle, replaceAllText, deleteContentRange, insertInlineImage, or addDocumentTab. For insertInlineImage, pass a short public HTTP(S) URL string directly in uri. For local/generated image bytes, put the workspace image path in image_uris and set the matching request uri to a non-public placeholder such as that same path. Do not pass base64 data URLs directly. Send each request as a structured object in the list, not as a JSON string or other stringified input. Requests execute in order. Do not use this to rename or move the Drive file; use update_file for Drive metadata or parent-folder changes.
document_idstringRaw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.
nulldocument_urlstringGoogle Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.
nullimage_urisarrayOptional sidecar file references for local or generated images used by Drive roll-up batch update actions. This exists because runtime file upload rewriting currently only handles top-level file parameters. Put local workspace image paths here in the same order as the matching image URL placeholders in requests. Public HTTP(S) image URLs should stay directly in requests and should not be repeated here. Do not pass base64 data URLs.
nullwrite_controlobjectOptional writeControl object for the underlying Google Docs API batch update call.
null