Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Send Request → Send to Google Docs API

AI-generated

Summary

Sends batch requests to update a Google Doc's content, structure, or style.

Inputs

  • documentId (required) — The ID of the Google Doc to update.
  • requestsSource — Where to get the requests from: 'From Input' (from item data) or 'Define Below' (hardcoded JSON).
  • runForEachInput — Whether to execute one API call per input item. If disabled, one API call is made per unique Document ID, collecting requests from all items.
  • requests — JSON array of request objects to send (visible only when 'Define Below' is selected).
  • writeControl — Controls the version of the document to update: 'Target' (specific revision ID) or 'Required' (optimistic locking).
  • autoUpdateRevisionId — Whether to automatically capture and use the latest revision ID for subsequent requests to the same document.
  • splitRequests — Whether to send each collected request as a separate API call instead of batching them together (visible when 'Run For Each Input' is enabled).

Output shape

a list of items with updated data and metadata (e.g., new revision ID).

If requests are split, the number of items equals the number of requests. If requests are batched, one item per unique Document ID is returned.

Examples

Example 1: Update a single document with multiple requests from input data.

Document ID from input, 'From Input' source, 'Run For Each Input' enabled, requests defined in input items.

Example 2: Update multiple documents with hard-coded request payloads.

Document IDs from input, 'Define Below' source, 'Run For Each Input' disabled (batches requests by Document ID).

Example 3: Apply a specific version constraint to prevent conflicts.

Document ID from input, 'Required' revision ID in Write Control.

Links

Discussion