Back to Google Docs

Connect Knoon AI with Google Docs (Google) to automate AI workflows.

Find and replace all occurrences of a given text in a Google Docs document.
googleDocsReplaceText
BETA
Permissions
  • https://www.googleapis.com/auth/drive.file
Optional permissions
  • https://www.googleapis.com/auth/drive
Parameters
NameTypeDescriptionRequired
documentIdfile Select the Google Docs document to run find-and-replace on.Yes
searchTextmustache Text to search for in the document (e.g. "{{oldCompanyName}}").Yes
replaceTextmustache Text to replace each occurrence with (e.g. "{{newCompanyName}}").Yes
matchCaseboolean Whether the search should be case-sensitive. Default is false.No
Returns
NameTypeDescription
statusstring UPDATED or ERROR.
replacedCountnumber Total number of occurrences that were replaced in the document.
sensitive.documentIdstring ID of the document that was updated.