Batch Update Google Document
docs_batch_updateApply batch updates to a Google Doc to insert, update, or delete text, formatting, images, and tables using the Google Docs API.
Instructions
Apply batch updates to a Google Doc (insert/update/delete text, formatting, images, tables).
Args:
document_id (string): The ID of the Google Doc to update
requests (array): Array of batch update request objects
Common request types:
insertText: { insertText: { location: { index: 1 }, text: "Hello" } }
deleteContentRange: { deleteContentRange: { range: { startIndex: 1, endIndex: 10 } } }
updateTextStyle: { updateTextStyle: { range: {...}, textStyle: {...}, fields: "bold" } }
insertInlineImage: { insertInlineImage: { location: {...}, uri: "https://..." } }
insertTable: { insertTable: { rows: 3, columns: 3, location: {...} } }
See Google Docs API batchUpdate documentation for full request schema.
Returns: { "documentId": string, "replies": array, "writeControl": object }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The ID of the Google Doc to update | |
| requests | Yes | Array of batch update request objects (see Google Docs API batchUpdate documentation) |