App Logo
docs.google.com

Google Docs: find and replace text

Automatically find and replace text on docs.google.com. Find and replace text in a Google Doc you can edit, directly (not as suggestions), with Docs' own Find and replace. Each find/replace pair is applied in order to every match; matching is literal and case-sensitive by default, and accents count. Returns the matches found per pair and reads the document back to confirm. An empty replace deletes the matches. Use dryRun to count matches without changing anything. When the browser is signed in to several Google accounts, pass the account to act as.

Input

url required

Link to the Google Doc (https://docs.google.com/document/d/<id>/...) or the bare document id.

replacements required

Applied in order.

dryRun optional

Count matches only; nothing is changed.

Default: false
account optional

Google account to act as when the browser is signed in to several. The run stops if the editor is signed in as someone else.

matchCase optional

Case-sensitive matching (default true).

Default: true

Output

dryRun required
verified required

True when, read back, no applied find text is left (where its replacement does not contain it); null on a dry run or when nothing matched.

documentId required
accountUsed required

Email of the Google account the editor was signed in as.

replacements required
totalMatches required

FAQ

Find and replace text in a Google Doc you can edit, directly (not as suggestions), with Docs' own Find and replace. Each find/replace pair is applied in order to every match; matching is literal and case-sensitive by default, and accents count. Returns the matches found per pair and reads the document back to confirm. An empty replace deletes the matches. Use dryRun to count matches without changing anything. When the browser is signed in to several Google accounts, pass the account to act as.
Ask an AI agent connected to Reduck to run reduck/docs.google.com/replace_text, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/docs.google.com/replace_text
You do not need one. "Google Docs: find and replace text" drives the real docs.google.com pages in a browser, so it works whether or not docs.google.com offers an API for this.
Required: url, replacements. Optional: dryRun, account, matchCase.
It returns dryRun, verified, documentId, accountUsed, replacements, totalMatches.
Yes. It acts as you on docs.google.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the docs.google.com cookies saved by the Reduck extension.
It makes changes on docs.google.com, like sending, posting, booking or buying something.
Ask an AI agent connected to Reduck to run reduck/docs.google.com/replace_text, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/docs.google.com/replace_text
It is part of Reduck's official curated catalogue.

Start building not clicking