Announcing Sub-Zap by Zapier

Categories: App Integrations Zapier Apps Beta Release
Announcing Sub-Zap by Zapier

TL;DW: Today we’re beta / soft launching a new “Sub-Zap” capability in Zapier. This makes it easy to build much more manageable Zaps whenever you find yourself reusing or recreating the same actions across many Zaps. You can define inputs and outputs, then use the same functionality across as many Zaps as you like. Try it in your Zaps today! https://zapier.com/apps/sub-zap-by-zapier/integrations

 

TL;DR: Watch the video demo showcasing 2 Zaps reusing a Sub-Zap that looks up a customer: https://www.youtube.com/watch?v=QsunZFwGIQM.

 

Hi folks! Over the years we’ve watched customers just like you build incredibly powerful and deeply interconnected systems of Zaps. In some cases, folks spent a lot of time updating the actions they share across those Zaps. For example, if a spreadsheet was used in a couple dozen Zaps, updating a single column might entail updating a couple dozen Zaps to match. That was incredibly tedious and totally counter to our mission to democratize automation.

So today we’re introducing a new primitive we hope will make it easier to share those actions and employ an “update once, use everywhere” sort of workflow. We call it “Sub-Zap by Zapier”. You can start using it today! Here’s how it works:

 

First, you’ll create a Sub-Zap using the “Start a Sub-Zap” trigger and the “Return from a Sub-Zap action.

In the Sub-Zap’s “Start a Sub-Zap” trigger, you’ll define the input fields like this:

In the Sub-Zap’s “Return from a Sub-Zap action, you’ll define the output fields like this:

 

Second, you’ll go to a different Zap and use the “Call a Sub-Zap” action.

You’ll be prompted for the input fields like this:

And you’ll receive the output fields like this:

 

Finally, you’ll enable both Zaps and let them run like normal!

 

If you’d like to see a live demo, check out our 10 minute example where I showcase a 3 Zap system where 2 Zaps reuse the functionality present in a single Sub-Zap: 

 

If you’d like to give it a try, we’ve opened it up to the public here: https://zapier.com/apps/sub-zap-by-zapier/integrations

 

If you have any feedback, feel free to respond here or email us at contact@zapier.com!

Hey @nicksimard 

 

I do not have a specific use case. I am just wondering about the fundamentals of how the sub-zap is set up. If multiple zaps are calling the same sub-zap will the sub-zap queue the requests in the order it received them (first in first out) or does it execute all these requests in parallel?


Hi there,
First let me tell you I am using SubZap intensively since day 1. And for a beta, folks, it is just an amazing achievement already.
Here are a few challenges that I am facing:
1- When the subzap execution is filtered before the return subzap, the parent zap is stuck waiting.

2- When the subzap execution is errored, the parent zap is stuck waiting.

3- When the execution is a bit complex and require a lot of fileds, there is no other convenient option than passing the id of an object and retrieve the object in the subzap, it would be great to be able to pass the full object payload to the subzap (I have a cascade of 4 subzap, each of them retrieving 2 objects, ==> 8 call to the API while 2 should be enough)

4- When you have branches in the child subzap, it is not really easy to make sure you set up the return zap output the same way, output field name could be defined from the start 

PS: i am using combinations of subzap, approval and loops (all beta) and it works fine !!!


Hey @tpretori and @Reno! :)

@tpretori - We can’t guarantee that each request made to the Sub-Zap would be run in the exact same time or order that they are received. In cases, where multiple requests come in at the same exact time either one could be processed first.


@Reno - Really pleased to hear you’re making good use of Sub-Zaps! It sounds like it may be best for you to reach out to our Support Team about these challenges. They’ll be better able to dig into the setup and logs for your Zaps to investigate and troubleshoot further. The best way to reach them is via the Get Help form.

That said, I have passed on your comments from points 3 and 4 over to the relevant teams here. We’re always looking to make improvements and really appreciate you taking the time to share this feedback here. While I can't promise anything specific, all feedback is reviewed for potential future implementation.


@MarijnVerdult you wrote:

@Jeff Thorns what you can do is fire the return only on the last iteration of the loop like I build in this Zap:

 

I am not finding that I can do this in a sub-zap.  Even with adding a filter to check for the last iteration of the loop, if I add the return from sub-zap after that I am seeing the error “You cannot have a looping step before a return step.”


Hi @Eric Alderman 

Sub-Zap help: https://help.zapier.com/hc/en-us/articles/8496308527629-Build-reusable-Sub-Zaps#h_01HMC6C572F2VF31DV5HANQJQB

 

Adding Loop actions within a Sub-Zap:

  • Loop actions can't be added before a Return from Sub-Zap step within a Sub-Zap.

 


@Troy Tessalone Thanks, yes I saw that - that’s why I’m asking @MarijnVerdult about their comment:

what you can do is fire the return only on the last iteration of the loop like I build in this Zap:

 

As this does not seem to be allowed in loops.


@bryanhelmig Can you clarify, when it says in the documentation “Loop actions can't be added before a Return from Sub-Zap step within a Sub-Zap.” -- does this mean in fact that Looping can’t be used at all in a Sub-Zap?  If so I think the documentation should be updated to be clearer about that.

 

Thanks.