Find and replace values in your Zaps

If you need to find and replace values in your Zap data, you can use Formatter's Text action. It includes three transforms:

  • Default Value: replaces a blank value in your mapped field's data with a value that you assign.
  • Find: searches for the first value in your data that matches your search parameters and returns the number of characters in the string before your value appears.
  • Replace: searches for and finds a value in your data, then returns the original string with the found value replaced by another value that you assign.

Available on plans:

Free

Professional

Team

Enterprise

Example
  • You have a Google form with an optional phone number field and a Zap that triggers from new form submissions. You mapped the phone number field to a required field in your Google Contacts action step. Sometimes, your users do not enter a phone number in your form, which causes an error in your action step. You can use the Default Value transform to replace the blank value with another value, like your own phone number, instead.
  • You regularly misspell a frequently used word, e.g. "wtih" instead of "with". You can use the Replace transform to automatically replace the misspelled word in your data with the correctly spelled word instead.

Prerequisites

You'll need an existing Zap with a trigger step already configured.

1. Add a Formatter step

  • In the Zap outline, click the Action step or the plus sign + to add a new action. A dialog box will open.
  • In the search box, search for and select Formatter. The right sidebar will open to the Setup tab.
  • Click the Action event field to open the dropdown menu and select Text.
  • Click Continue to continue to the Configure tab.

2. Set up your transform

Click the Transform field to open the dropdown menu, then select the transform you want to use.

Default Value Find Replace
  • In the Input field, manually enter the string you want to transform or map a field from a previous step.
  • In the Default Value field, manually enter the value or map another field that will contain a value you want to use to replace a blank value in your mapped field.
  • Click Continue to continue to the Test tab.

Special character syntax

You must use a specific syntax for special characters in the Find, Replace, and Default Value fields:

Syntax Special characters it replaces
[:space:] Use instead of space (\s) characters
[:tab:] Use instead of tab (\t) characters
[:newline:] Use instead of newline (\n) characters
[:return:] Use instead of carriage-return (\r) characters

3. Test your action

  • Click Test step.
    • The Data out tab will display the transform output so you can confirm your string was formatted correctly.
    • If the new data is not what you expect, you can adjust the transform settings and retest the step again.

Once you've set up your Formatter action, you can use the results in further actions in your Zap.

Related resources

Was this article helpful?
10 out of 36 found this helpful