Best answer

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

  • 1 May 2020
  • 1 reply
  • 408 views

Userlevel 2
Badge

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 

icon

Best answer by ForYourIT 1 May 2020, 23:55

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.

1 reply

Userlevel 7
Badge +7

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