ActionGoogle DocsUpdated September 2026
How do I find-and-replace in a Google Doc?
Short answer: You can replace text in doc in Google Docs by hand from its own interface, but it won’t repeat itself. On TinyCommand, add the Google Docs Replace Text in Doc action to a workflow, map its 4 inputs from any upstream app, and it runs automatically every time the trigger fires. No code, and a free tier to start.
Inputs
The fields this action accepts.
Every field can be mapped from an upstream trigger, AI step, table row, or hard-coded literal.
| Field | Type | Required | Description |
|---|---|---|---|
Document ID documentId | string | Required | Document ID |
Text to Find searchText | string | Required | Text to Find |
Replace With replaceText | string | Required | Replace With |
Match Case matchCase | boolean | Optional | Match Case |
Sample request
{"documentId": "{{trigger.documentId}}","searchText": "{{trigger.searchText}}","replaceText": "{{trigger.replaceText}}","matchCase": "{{trigger.matchCase}}"}
Returns
{"replies": [{"replaceAllText": {"occurrencesChanged": 3}}],"documentId": "1BxiMVs0..."}
Use these fields in downstream nodes for routing, logging, or error handling.
Triggered by
Apps that pair well as the trigger for Replace Text in Doc.
Any of these apps can fire this action as part of a workflow.
FAQ
Questions about Replace Text in Doc.
What does the Replace Text in Doc action do in Google Docs?
Find-and-replace across the doc. The templating workhorse — fill {{customer_name}} placeholders in a templated Doc with workflow data. For multi-replace workflows, batch via Update Document for efficiency.
What inputs does Replace Text in Doc require?
Required: Document ID, Text to Find, Replace With. Every input accepts a static value or a variable from any upstream node in your workflow.
Can I use dynamic inputs from earlier workflow nodes?
Yes. Any field on this action can pull values from upstream nodes, whether that's a form response, a trigger payload, an AI output, or a lookup result.
What happens if Google Docs returns an error?
The run history shows the failed step with its input and the error message Google Docs returned, so you can fix the input and run the workflow again. Automatic retries are built into HTTP steps only, where you can also set your own retry count and delay.
Does Replace Text in Doc support batch operations?
Run Replace Text in Doc inside a loop to process each item in an array. TinyCommand does not throttle calls for you, so for large arrays add a Delay step if you need to stay within Google Docs's rate limits.
More actions
Other Google Docs actions.
Action
Append Text to Doc
Adds text to the end of a Doc with optional styling. For "daily standup note → append today's update to the weekly notes doc" patterns.
ActionCreate Google Doc
Creates a blank Doc. For templated content creation, the standard pattern is Copy a template via Google Drive's Copy File action, then run Replace Text to fill {{placeholders}}.
ActionGet Google Doc
Returns the doc as a structural tree (paragraphs, tables, runs). For "extract plain text" workflows, walk the tree and concatenate textRun content. For structured workflows, preserve the tree for round-tripping back into the doc.
ActionUpdate Google Doc (Batch)
Batched-requests API for inserting at specific indexes, formatting ranges, modifying tables. For "insert images at this position" or "format this paragraph as a heading" workflows that go beyond simple text replacement.