Skip to main content

I have a zap that calls on a sub-zap. Halfway through the sub-zap, I need to branch off if there is an undesired output from a ChatGPT step and notify myself to retry the zap. And I want the zap to terminate there.

 

This is basically simulating an error message, but because an undesirable output from ChatGPT isn’t considered an error by Zapier, I’ve set up a path to deal with this.

The thing is, the path occurs within a sub-zap. If my sub-zap branches off and sends me an email and ends, my main zap would still be waiting for a response from the sub-zap (as it would normally if the sub-zap had continued down the main path).

Would not hearing back from my sub-zap result in an error (I have autoreplay zaps turned on and would hate to burn through tasks while the main zap is constantly waiting).

Hi @MJ_IATC 

Help article to reference about using Sub-Zaps: https://help.zapier.com/hc/en-us/articles/8496308527629-Build-reusable-Sub-Zaps

 

Why is my Sub-Zap stuck in a Waiting status?

If you see a Sub-Zap with a Waiting status in your Zap run history, a Filter or Path action in the Sub-Zap prevented the Sub-Zap from continuing. Any Zaps associated with your Sub-Zap won't continue past the Return from a Sub-Zap action.

Learn more about Sub-Zap example workflows.

 

Adding Paths actions within a Sub-Zap:

  • If you use multiple Return from Sub-Zap steps within Paths, only the first one will run successfully. The Path branch logic must be configured to be mutually exclusive so that only one ‘Return from Sub-Zap’ step runs at the same time.

I think I figured this out, for anyone else who might have a similar query.

 

I had to return the data from the sub-zap after going down the error path. This return from sub-zap steps returns a field for ‘status - failed’.  It returns that to the main zap and the man zap then branches off too (if the sub-zap returns a ‘failed’ status), resulting in an email notification telling me of the error. 


That’s awesome @MJ_IATC! We’re glad to hear you were able to get it sorted! 

Also, thank you for sharing your solution here. This will definitely helpful to our other amazing Community members.

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help!