- Integrations
- /
- Google Docs
- /
- Actions
- /
- Replace Text in Doc
ActionGoogle DocsUpdated May 2026
How do I find-and-replace in a Google Doc?
Short answer: Drop the "Google Docs → Replace Text in Doc" action anywhere in your workflow, map the inputs from upstream nodes, and publish.
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 workflow pauses on the failed node, the error message is captured in the run log, and you can retry the run with one click. Auto-retry policies are configurable per workflow with exponential backoff up to 5 attempts.
Does Replace Text in Doc support batch operations?
Yes. Run Replace Text in Doc inside a Loop node to process arrays. Tiny Command handles Google Docs's rate limits automatically so you don't have to throttle manually.
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.
Send replace text in doc from your workflows.
Triggered by anything in the catalog. Free tier available. No credit card.