Common Problems with Formatter

My Formatter step is not changing my data

After you’ve set up and tested your Formatter step, remember to map the output of the step one of your action steps instead of the original data, which does not change.

For example, imagine a Zap where your trigger step collects a user’s full name through a question in SurveyMonkey, and you’ve set up a Formatter step to split out just the first name for use in an email. If you have the Zap set up like this, the full name will be used each time:

If you map the output of your Formatter step here, instead, though, just the first name will be used:

The date format I want is not in the list of choices

If you the format you need is not available, you can manually enter one by clicking on the dropdown and select "Use Custom Value". See the Date & Time section for more info on the syntax of the format.

How does the "Second to Last" segment index of the Split text function work?

Second to Last

The "Second to Last" segment would be the segment BEFORE the last index.

For example:

If you have a string of text to split that has 4 words: "Rip Van Old Winkle"

  • First segment: "Rip"
  • Second segment "Van"
  • Second to last: "Old"
  • Last Segment: "Winkle"

If you have a string of text to split that has 3 words: "Ned Eddard Stark"

  • First segment: "Ned"
  • Second segment "Eddard"
  • Second to last: "Eddard"
  • Last Segment: "Stark"

If you have a string of text to split that has 2 words: "John Snow"

  • First segment: "John"
  • Second to last: "John"
  • Last Segment: "Snow"

I want to split a name field from the trigger into a first and last name field in the action

You can do this via the Formatter Text action using the Split transform and using a space as your character. You'll need two actions - one to grab the first segment and one to grab the second. However, there are some things to be aware of. If someone's name is Vicky Cassidy, then this works great - you'll split Vicky and Cassidy.

If, however, someone's name is Vicky Van Cassidy, then you'll get Vicky as the first name and Van as the last name. If someone's name is Vicky Sue Cassidy then you'll get Vicky as the first name and Sue as the last name.

For an added level of security you can do three segments with three Formatter steps like this:

First action:

form1

Second action:

Formatter #2

Third action:

Formatter #3

Using a custom value of 2 will get your the third segment - it's counterintuitive, but the first segment = 0. Then in the action you'll map the output of 1 to First Name and the output of 2 and 3 to Last name.

However, this still won't be perfect for people with +3 names or people with 2 words as a first name, so there is still a risk. We recommend not using a split but instead mapping the full name to either the first or last name field in the action.

Sometimes my data is blank, empty, unchanged, or not in the right format

Formatter's handling of blank and invalid values varies by the type of Action being used. Here is a summary of the behavior you can expect:

Text Transforms:

  • Blank values return blank ('')
  • For transforms that involve parsing/extracting text, when it fails, returns blank

Number Transforms:

  • Formatting (Number, Currency, Phone Number)
    • Blank values return blank ('')
    • When formatting fails to produce a sensible value, will return the input unaltered (so "N/A" stays "N/A")
  • Operations (i.e. add)
    • Skip non-numerical inputs and return the result of performing the operation on numerical inputs
    • If all inputs are blank, will return 0
  • Spreadsheet Formula that fail to run correctly result in an error

Date/Time Transforms:

  • Blank values return blank ('')
  • When a valid date cannot be parsed from the input, returns "now", the moment in time the Zap is executing

The "Extract Pattern" transform isn't giving me text output.

The best option here is to include a capture group with your regex. The Extract Pattern Transform will only return the text if there is a capture group included - for example, if you are searching for the text "three" within "one two three four", you should put "three" in parens as shown here:

That will output:

If you are not able to set that up, the output of Formatter's Extract Pattern Transform does not provide the extracted text, but instead provides these three fields:

  • _end - last position of match in text
  • _start - first position of match in the text
  • _matched - true or false based on the match

Several Formatter steps can be used to extract the text using these Extract Pattern position outputs - specifically, a Math Operation step and a Truncate step. Please contact support for assistance with setting this up.

My Formatter Step Is Incorrectly Converting the Date

Usually when the Formatter step's "From Format" field is not set (screenshot below)

This ends up throwing off the Formatter app and creates an incorrect conversion. For example, if you refer to the gif below, it shows that the date provided to the Formatter step is 11/05/2018 but the output is 01/01/18

But once you set the "From Format", this helps the Formatter figure out the format of the date and create an accurate conversion.

In the gif below, it shows that the date 11/05/2018 (DD/MM/YYYY) was converted to 05/11/2018 (MM/DD/YYYY) correctly:

My Format Phone Number Step Is not modifying the phone number

When formatting a phone number using the Formatter > Number > Format Phone Number transform, Zapier validates whether or not the "from" phone number is valid in the country code selected (US is the default).

Fake phone numbers (e.g., there is no 555 area code in the US) or a "phone number" with too many or not enough numbers, or phone numbers with invalid characters will result in an unchanged output.

attempting to format an invalid phone number

output of attempt to format an invalid phone number shows unchanged number

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