Split up trigger data in Zaps

If your trigger data has a block of text that you need to split up, you can use named variables to separate the data. When you use named variable syntax, Zapier will reformat your trigger data as separate fields (variables) and their corresponding values. You can then map your named variables to later action steps in your Zap.

1. Edit data sent by the trigger app

To use named variables in Zaps, you must format your data so the Zap will recognize each separate variable and it’s value. Use the syntax named_variable(value):

  • Remove any spaces from the name of your variable.
  • Wrap the variable value in parentheses.
    • Variable values can have any character, including spaces.
Tip

If your variable name has spaces (e.g. between words), you can add underscores between words (e.g. first_name) or capitalize the first letter of each word (FirstName) to make it easier to read.

2. Check your named variables

  • Test your trigger.
  • Your original, unformatted text will appear, as well as your named variables and their values.
actionEdit icon Example

If you send a customer’s contact information in the body of your email, you can use named variables to separate each piece of contact information into its own variable. If your original data is:

First Name Philip
Last Name Fry
Email Address philip.j.fry@planetexpress.net
Phone Number 123-456-7890

Reformat it in your app as:

FirstName(Philip)
LastName(Fry)
EmailAddress(philip.j.fry@planetexpress.net)
PhoneNumber(123-456-7890)

When you test your trigger, you'll see both the email body with the named variables syntax as well as each individual named variable and its value.

Named variable syntax and individual named variables with their values.

Limitations

  • You must be able to format the trigger data before it’s sent to your Zap.
    • If this data is automatically generated, you’ll need to use a Formatter step to modify that data instead.
  • Named variables can only contain letters, numbers, or underscores.
Was this article helpful?
0 out of 1 found this helpful