Batch Update Google Doc
docs_batch_updateApply a batch of edit requests to a Google Doc in a single call. Order changes from the end toward the start to handle shifting indexes, and pass a revision ID to fail fast if the document changes.
Instructions
Apply a batch of edit requests to a Google Doc (documents.batchUpdate).
Accepts any Docs API request type (insertText, deleteContentRange,
updateTextStyle, insertTable, insertInlineImage, ...). Indexes shift as
earlier requests in the batch insert or delete content, so order edits from
the END of the document toward the start, or send one request per call.
Get current indexes from docs_get first. Pass writeControl with the
revision id from docs_get to fail fast if the document changed since —
otherwise stale indexes edit the wrong ranges silently.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requests | Yes | The batchUpdate `requests` array (list of request dicts). | |
| documentId | Yes | Target document id. | |
| writeControl | No | Optional {"requiredRevisionId": "..."}. | |
| user_google_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||