Help

Add branching logic to Zaps with filters

tutorial
Last updated:

You can add if/then or branching logic to Zaps by using filters in multiple Zaps. This allows your Zaps to take different actions based on the trigger data received.

Heads Up

If you're on a Professional plan or above, you can add if/then or branching logic to Zaps with Paths.

This article walks through an example of a Shopify store with two items: apples and bananas. When a customer buys an apple, their email address should be added to an 'Alpha-Apple' MailChimp list. When a customer buys a banana, their email address should be added to a 'Beta-Banana' MailChimp list.


1. Create the first Zap and filter

  • In the first Zap, the trigger event is when there is a new Shopify order.
  • Add a filter that identifies when the Shopify order details contain the text Apple.

Apple

  • Next, add a MailChimp action to Add/Update Subscriber. In the action template, select the Alpha-Apple list.

Alpha-Apple


2. Create the second Zap and filter

  • In the second Zap, the trigger event is also when there is a new Shopify order.
  • Add a filter that identifies when the Shopify order details contain the text Banana.

Banana

  • Next, add a MailChimp action to Add/Update Subscriber. In the action template, select the Beta-Banana list.

Beta-Banana

When a customer buys an apple from your Shopify store, it will trigger both Zaps but only pass the filter in the first Zap to get added to the 'Alpha-Apple' MailChimp list. When a customer buys a banana from your Shopify store, it will trigger both Zaps but only pass the filter in the second Zap to get added to the 'Beta-Banana' MailChimp list. This can be repeated with more Shopify store items and MailChimp lists by creating more Zaps with the relevant filter rules.


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