Skip to main content
Best answer

How can I abort a Zap's run using Code for Zapier? Exception?

  • May 1, 2020
  • 1 reply
  • 635 views

Forum|alt.badge.img

There are circumstances in which I want the zap to stop running. I detect these in code.

What do I do in the code to “stop” to this run? I tried thowing an exception, but the next step ran.

Thanks 

Best answer by ForYourITBest answer by ForYourIT

Hi @mrjcleaver,

Great question! I am not sure if my thinking is what you are looking for, but please let me know. So what you could do is the following:

  • Create a variable in your code that is True whenever your statements that should stop the workflow meets the requirements
  • Output this variable using “output”:
  • Create a filter by zapier action that allows you to filter this variable.

If the variable is True → Stop the whole workflow. Else continue.

Let me know if that works.

 

~Bjorn

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

ForYourIT
Forum|alt.badge.img+7
  • Tinkerer
  • 259 replies
  • Answer
  • May 1, 2020

Hi @mrjcleaver,

Great question! I am not sure if my thinking is what you are looking for, but please let me know. So what you could do is the following:

  • Create a variable in your code that is True whenever your statements that should stop the workflow meets the requirements
  • Output this variable using “output”:
  • Create a filter by zapier action that allows you to filter this variable.

If the variable is True → Stop the whole workflow. Else continue.

Let me know if that works.

 

~Bjorn