Skip to main content

Hi folks! Clint here again with another Workflow Wednesday! This time we’re going to talk about using Paths in Loops to tackle a complex problem.

The Challenge

I talked to someone recently who needed to do the following:

  1. Loop through a series of line items and add them to a Digest if they met certain criteria
  2. Release that digest on the very last iteration of the Loop

If we were doing either of these on their own, a Filter would be enough. But since we need to do both, then we’ll need to use Paths.

The Solution

Using a Path in a Loop is exactly the same as using Paths outside of a Loop - but it’s important to understand how Paths work in the first place.

Using Paths is basically like having multiple filters in a single Zap. Every time a Zap with Paths runs, every Path will be evaluated and run if the criteria is met. So let’s say you have two paths:

  • Path A: Only continue if Email Address Exists
  • Path B: Only continue if Full Name Exists

If the Zap triggers and has both an Email Address and a Full Name, then Path A and Path B will both run - it’s not an either/or situation.

For Loops, the same is true, but for each loop iteration. So if you nested Paths in a Loop like the above, then each loop iteration will evaluate both paths, and potentially run both of them simultaneously.

In our scenario, where we’re adding info to a digest and releasing that on the last iteration, the Paths will look something like this:

  • Path A: Only continue if Email Address Exists - we don’t want to add any contacts with blank emails to the digest
    • Action: Append Entry and Schedule Digest - we’ll add the contact to the digest since their email exists. Set the Frequency to Manual, since we’ll be releasing it in Path B
  • Path B: Only continue if Loop Iteration is Last is true - this will only continue on the very last loop
    • Action: Delay for 1 minute - we want to wait just to make sure all of the other loops are finished
    • Action: Release Digest - we’ll release the digest from before after all the other loops have added their data

Each time the Loop runs, both paths will be evaluated. This could result in one, both, or neither of the paths running depending on what’s happening in that loop.

NOTE: You cannot have more than one Loop in a single Zap! In other words, you can’t put multiple Looping by Zapier steps into a single Zap, even if they’re in different Paths. That’s a limitation of our system - you can only put Paths into a Loop as described above.

Wrapping Up

There’s a lot of potential here to use Paths in Loops to accomplish complicated workflows. I hope this is useful to you, and let me know if you come up with any interesting ideas using this!

This is actually amazing. I was filtering out stuff I didn’t want in my loop, but didn’t think to try a path.

 

Thank you!!


That’s so great to hear, ​@nels! 🎉 Really pleased that Clint’s guide was helpful to you, and thank you for taking the time to share such a lovely comment! 🤗🧡


 

Hey ​@ClintEmsley! Amazing guide, it helped me tremendously with finding a solution to my problem, however I am looking for some advice on how to fix a problem I have with it; Path B is not activating, I believe this may be because the last loop is not activating as it should.

 

I’m attaching a few screenshots for clarity below, but basically I have a set of line items that sometimes ends in a blank item. It is a maximum of three names in this list, but occasionally there will be two, yet the third blank name still appears in the line item list for the looping step. I imagine that if it’s blank, the rest of the steps do not continue, and the second path never runs.

Let me know if you can find the issue and/or know a way to fix it, it’d be much appreciated. Thank you so much for your time!


Hi ​@AaronM! 👋

Hope you don’t mind me jumping in for Clint here. I did some testing in my own Zap and created five line items—two of which were blank:

3403780ded2b758f288477edc4b02ddb.png
 

Then I passed that along to a Looping action and it correctly ignored the blank line items and only created three loop iterations:

aa5bfe5e2cd205d2a0ad9e0596905755.png

For Zaps with Looping actions each loop iteration will appear as a separate Zap run so it could be that there’s another Zap run where Path D did run. 🤔

Can you take a look in the Zap history for a recent trigger of the Zap and find all the Zap runs for each of the different loop iterations relating to it? Then take a look into each of the related Zap runs to confirm whether Path D ran for one of them?
If it did but failed to release the Digest then there could be an issue with the set up of the Digest action and/or the Send Email action that should be sending the digest contents. In which case can you send over some screenshots of current set up of all the Digest actions in the Zap as well as the Microsoft Outlook actions in the Zap? Make sure to blur or remove all personal information (names, emails, addresses etc.) from screenshots before sharing - you can use a tool like Zappy for that.

Looking forward to hearing from you!


Hey ​@SamB , thank you for the response!

 

Can’t believe I missed that, it actually did run in one of the steps, I kept testing it so I had a ton of different zap runs and it slipped through the cracks 😅 So it’s actually all good now! Thank you so much for the help, I wouldn’t have thought to recheck the runs without you mentioning it.

 

Happy New Year!! 🥳


Happy new year to you too, ​@AaronM! 🎉

No problem at all—it’s so easy to miss things like that, especially with so many Zap runs to sift through. Really glad it’s all sorted now but do reach back out if there’s anything else we can help with. In the meantime, happy Zapping! 😁⚡️ 


Reply