Best answer

What happens if I create a path within a sub-Zap?

  • 6 February 2024
  • 3 replies
  • 46 views

Userlevel 1
Badge

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).

icon

Best answer by MJ_IATC 7 February 2024, 15:36

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

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.
Userlevel 1
Badge

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. 

Userlevel 7
Badge +6

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!