GOOGLE WORKSPACE Replace text (Docs) function

The GOOGLE WORKSPACE Replace text (Docs) function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Google Workspace connector function to find and replace text in a Google Docs document.

For a full list of available functions, please read GOOGLE WORKSPACE functions.


Description

The Replace text function finds all occurrences of a text string in a Google Docs document and replaces them with a new value. Supports case-sensitive matching.


Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the Google Workspace connector to use
Document IDYesText-Google Docs document ID
FindYesText-The text to search for
ReplaceYesText-The replacement text
Match caseNoBooleanfalseWhether the search is case-sensitive
VariableYesText-Variable to store the result

Output variables

VariableTypeDescription
VariableObjectObject containing occurrencesChanged count

Errors

  • Document not found – the document ID is invalid or you lack access

Tips

  • Use placeholder tokens like {{name}} in document templates for easy replacement
  • The function replaces all occurrences, not just the first

Related functions

  • Get text – Get the document text to verify replacements
  • Insert text – Insert text at a position

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.