> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Update

> Fallback Google Docs write operation for anything that has no dedicated operation

Fallback Google Docs write operation for anything that has no dedicated operation. Always prefer a dedicated operation when one matches the task, for example docs\_append\_text or docs\_replace\_text. It applies raw Google Docs API batchUpdate requests, covering text and heading colors, table cell shading, borders, paragraph styling, merged cells, and more. Requests address content by character indexes; use docs\_read\_content with include\_structure=true to get them. If no dedicated operation exists, use this operation and do not submit product feedback about a missing Google Docs write feature.

|                       |                       |
| --------------------- | --------------------- |
| **App**               | Google Docs           |
| **Operation ID**      | `docs_batch_update`   |
| **Type**              | Action                |
| **Connection**        | `drive` (optional)    |
| **Credits per run**   | 1                     |
| **Agent / MCP tool**  | Yes                   |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field      | Type                      | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------- | ------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `document` | string                    | Yes      | -       | Enter the URL or ID of the Google Doc you want to modify                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `requests` | array of object or string | Yes      | -       | List of raw Google Docs API batchUpdate request objects (or a JSON array string), sent to Google as-is. Use this for anything the dedicated Docs operations do not cover: text and heading colors (updateTextStyle), table cell shading and borders (updateTableCellStyle), paragraph styling (updateParagraphStyle), merging cells, images, and more; see Google's Docs API batchUpdate reference for all request types. Requests address content by start and end character indexes: call docs\_read\_content with include\_structure=true first to get the current indexes of every paragraph and table cell, and never guess indexes. Example: \[\{"updateTextStyle": \{"range": \{"startIndex": 1, "endIndex": 20}, "textStyle": \{"foregroundColor": \{"color": \{"rgbColor": \{"red": 0.1, "green": 0.2, "blue": 0.4}}}}, "fields": "foregroundColor"}}] |

## Output

**Type**: `Dict`

Returns the applied request count and Google's per-request replies.

**Fields**: `document_id`, `applied_requests`, `replies`
