Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Text Request → Replace All Text

AI-generated

Summary

Replaces all occurrences of a specified text pattern in a Google Doc with new text, optionally using regex, case sensitivity, and specific tabs.

Inputs

  • matchText (required) — The text to search for in the document.
  • replaceText — The text that will replace the matched text.
  • matchCase — Whether the search should respect case (True = case sensitive, False = case insensitive).
  • searchByRegex — Whether the search text should be treated as a regular expression (True) or a substring (False).
  • additionalFields — Additional fields for filtering or specifying the search scope, such as 'tabIds'.

Output shape

No output data — the operation executes a batch request to Google Docs, updating the document in place.

The operation consumes the document ID from the previous node's input. It sends a single batch update request to the Google Docs API; the node does not return processed items.

Examples

Example 1: Replace all instances of 'Jane Doe' with 'John Smith' in the entire document.

Set Match Text to 'Jane Doe', Replace Text to 'John Smith', Match Case to True.

Example 2: Find and replace all occurrences of a date pattern (e.g., '2023-XX-XX') with a new date using case-insensitive regex.

Set Match Text to '2023-XX-XX', Replace Text to '2024-01-01', Search By Regex to True, Match Case to False.

Links

Discussion