Find and replace values in your Zaps

Available on plans:

Free

Pro

Team

Enterprise

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.
actionEdit icon 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.

1. Add a Formatter step

  • In the Zap editor, click the Action step. 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 that you want the Zap to perform on your string:
    • Default value.
    • Find.
    • Replace.
  • In the Input field, manually enter the string you want to transform or map a field from a previous step.
  • If you’re using the Default Value transform:
    • In the Default Value field, manually enter the value or map another field that will contain a value that you want to use to replace a blank value in your mapped field.
  • If you’re using the Find transform:
    • In the Find field, manually enter the value or map another field that will contain a value that you want to find.
    • (Optional) In the Skip Characters field, enter the number of characters that the transform should ignore at the start of the string before searching for the value.
  • If you’re using the Replace transform:
    • In the Find field, manually enter the value or map another field that will contain a value that you want to find.
    • (Optional) In the Replace field, enter value or map another field that will contain a value that you want to replace the value in the Find field with.
    • If you do not include a value in the Replace field, the Zap will return the portion of the string leading up to the value in the Find field, including the value.
  • Click Continue to continue to the Test tab.
miscEye icon Note

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.



Was this article helpful?
0 out of 1 found this helpful