Split text fields in Zaps

If you want to split a value from a single text field into separate values, you can use the Formatter app’s Split Text transform.

actionEdit icon Example

You have a Facebook Lead Ads form that sends users’ first and last names as a single value in a Full name field but your Google Contacts app has separate First name and Last name fields. Use the Split Text transform to separate the full name values into separate first name and last name values.

 

1. Add a Formatter step

  • In the Zap editor, click the Action step, or click the plus + icon to add a step to your Zap.
  • In the dialog box, select Format from the right sidebar. The dialog box will close and the editor's right sidebar will open.
  • Click the Event dropdown menu and select Text.
  • Click Continue.
  • In the Set up action section, click the Transform dropdown menu and select Split text.
  • In the Values section, click the Input field and enter the value that you want to transform. You can map a field from a previous step or manually enter a value.

Screenshot of mapped field in the Formatter Text Split Text Transform within the Zap editor.png

 

2. Select a separator

Use the Separator field to indicate how you want Formatter to split your text. You can use characters, words, or special character syntax as breakpoints where Formatter should separate your text.

Formatter supports the following special character syntax:

  • [:space:] - matches space (\s) characters
  • [:tab:] - matches tab (\t) characters
  • [:newline:] - matches newline (\n) characters
  • [:return:] - matches carriage-return (\r) characters

 

actionEdit icon Example

If you need to split the full name “Jane Doe” into separate first name and last name values, you can use the [:space:] special character syntax.

Screenshot showing you how to add a separator for the Split Text transform in the Zap editor.png

 

3. Select a segment Index

Use the Segment Index field to indicate which segment of your split text Formatter should return.  Select one of the following options:

  • First: returns only the first segment.
  • Second: returns only the second segment.
  • Last: returns only the last segment.
  • Second to Last: returns only the second to last segment.
  • All (as Line-items): returns all segments as individual line items.
  • All (as separate fields): returns all segments as individual fields.
ratingStar icon Tip

You should split your text into segments according to how you need to use them when mapping fields in later steps of your Zap.

actionEdit icon Example

Using the previous example of the text “Jane Doe”, Formatter will return:

  • First: “Jane”.
  • Second: “Doe”.
  • Last: “Doe”.
  • Second to Last: “Jane”.
  • All (as Line-items): “Jane” and “Doe” as separate line items.
  • All (as separate fields): “Jane” and “Doe” as separate fields.

 

4. Test your text transform

  • Click Test & Review.
  • If the test was successful, you'll see the results of the text transform.

 

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

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