find_and_replace_doc
Search for and replace specific text in Google Docs to update placeholders, words, or phrases without index calculations.
Instructions
Finds and replaces text throughout a Google Doc. No index calculation required.
This is the safest way to update specific text in a document because it does not require knowing any indices. Use this tool when you need to:
Replace placeholder text (e.g., {{TITLE}}) with real content
Update specific words or phrases throughout the document
Make targeted text changes without risk of index errors
For building documents from scratch, consider inserting text with unique placeholders via batch_update_doc, then using this tool to replace them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | User's Google email address | |
| document_id | Yes | ID of the document to update | |
| find_text | Yes | Text to search for | |
| replace_text | Yes | Text to replace with | |
| match_case | No | Whether to match case exactly | |
| tab_id | No | Optional ID of the tab to target |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |