Skip to main content

Find and Replace

Finds and replaces text in a Google Spreadsheet.

Common Properties​

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs​

  • Spreadsheet Id - The ID of the Google Spreadsheet where the find and replace operation will be performed.
  • From Cell - The starting cell of the range to search in (e.g., "A1"). Used when targeting a specific range.
  • To Cell - The ending cell of the range to search in (e.g., "Z100"). Used when targeting a specific range.
  • Find - The text to search for in the spreadsheet.
  • Replacement - The text to replace the found text with.

Options​

  • Match Case - If enabled, the search will be case-sensitive.
  • Match Entire Cell - If enabled, only cells that exactly match the search text will be replaced.
  • Search By Regex - If enabled, the search text will be treated as a regular expression.
  • Target - Specifies whether to search in all ranges or a specific range:
    • All Range - Searches the entire spreadsheet
    • Specific Range - Searches only within the specified range (From Cell to To Cell)

Output​

No output variables for this node.

How It Works​

The Find and Replace node searches for specific text in a Google Spreadsheet and replaces it with new text. When executed, the node:

  1. Validates all input parameters
  2. Connects to the Google Spreadsheet using the provided ID
  3. Determines the search range based on the Target option
  4. Constructs a find and replace request with the specified parameters
  5. Sends the request to the Google Sheets API
  6. Returns any errors encountered during the process

Requirements​

  • A valid Google Spreadsheet ID
  • Valid cell references for the range (if using specific range)
  • Proper Google Sheets API authentication and permissions

Error Handling​

The node will return specific errors in the following cases:

  • Empty or invalid Spreadsheet Id
  • Empty Find text
  • Empty Replacement text
  • Invalid cell references for From Cell or To Cell
  • Google Sheets API authentication or permission errors
  • Network or connectivity issues with Google Sheets API

Usage Notes​

  • The Spreadsheet Id can be obtained from the URL of your Google Spreadsheet
  • When using specific range, both From Cell and To Cell should be specified
  • Regular expressions in the Find field must follow Google Sheets regex syntax
  • The operation affects all sheets in the spreadsheet when using "All Range" target
  • This operation modifies the spreadsheet data, so use with caution
  • Ensure your Google account has proper permissions to modify the target spreadsheet