Find and Replace Doc
find_and_replace_docFind and replace text in Google Docs without calculating indices. Update placeholders or specific phrases directly in the document.
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 |
|---|---|---|---|
| tab_id | No | Optional ID of the tab to target | |
| find_text | Yes | Text to search for | |
| match_case | No | Whether to match case exactly | |
| document_id | Yes | ID of the document to update | |
| replace_text | Yes | Text to replace with | |
| user_google_email | Yes | User's Google email address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |