Help

Split up trigger data with named variables in Zaps

tutorial
Last updated:

If your Trigger only sends a block of text—such as the body of an email or a note—but you want to access different parts of that text as separate variables later in your Zap, Zapier has a special syntax you can use called Named Variables. Named Variables are a way for you to send information separately so you can use it for multiple fields, or you can just use part of it for one field.

Example

Say you’re receiving all of a customer’s contact information in one paragraph of text from your trigger. If you wanted to send the customer’s first name, last name, email address, and phone number separately in different fields of your subsequent action steps though, you could do that with Named Variables.

Heads Up

You must be able to format the data that’s coming over in your Trigger. If this data is automatically generated, you’ll need to use a Formatter step to split that data, instead.


1. Edit data sent by the Trigger app

First, you’ll need to edit the data that your Trigger app sends over so that Zapier receives it in the right format. For something to show up as a separate variable:

  • Write the variable name without spaces: for example, turn “First name” into “FirstName”
  • Add the value of the variable in parentheses directly after: “FirstName(Phillip Fry)”

So if your original data looks like this:

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

With named variables, it should look like this:

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

Heads Up

Named variables can only contain letters, numbers, or underscores.


2. Select the fields you need in your action steps

Test your trigger to get the new data. Now, when you’re mapping these fields in your action steps, you will see that you can select each named variable you set up from the dropdown separately.

In this example, we formatted our Gmail message to include named variables and now they show up as separate fields in our action steps.

Once you’ve set up your action steps, you can turn on your Zap. If you have issues in getting your named variables set up, contact support.


Was this doc helpful?

Need More Help?

Zapier Support

Contact our world class support team and we’ll be happy to help you get up and running!
Contact Us

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert