If 3 breaks, I'll continue with another operator. It's possible?

Hi,
I’m new to Make and I’ve done an advanced scenario where the user submits a Web form and I retrieve the data from the Webhook before doing various steps including calling the Open AI API.
As the OpenAI API regularly saturates, I’d like to be able to say, "OK, you try 3 times and if that doesn’t work, you switch to the HTTP operator to send a message to the user on the form page.

I don’t understand, when I ask for the “increment” function it doesn’t work when I select “after one scenario run”. It only works when I tick “Never” but then the value never resets to 0…

I have to put “sequential processing” in the scenario options so that the processing finishes itself.

How would you do this?

I had based myself on this post: If Break Error Module Ends, Continue with Another Module, Possible?

Thx

Tof

Image from my script :

Hi :wave:t5:

It, unfortunately, is not easy to define a secondary error route after 3 “Break” resolution attempts.
As you mentioned, using the “Increment function” is not ideal since the counter cannot be reset.

You, however, might try to use a different approach with Data Store modules.



Every time an error route is used, the datetime of the error is stored in the Data Store.

Right after that, a single, oldest record would be retrieved (Ascending sorting + limit set to 1) That, basically, will be the very first occurrence of the error from a particular scenario execution.


The filters after the router then check when the first error happened and if it is not older than the predefined time (e.g. 60 minutes) it means that less than 2 or 3 Break attempts were performed and thus "Break" will be activated.


In case it is older, it means no more Break attempts are needed and a secondary route is executed.


Finally, all error records would be deleted at the very end of the secondary route which means the Data Store is “ready” for the next error occurrence.


Please note that using the "Sequential processing" is essential for this logic otherwise multiple incomplete executions and standard scenario execution could happen at the same time and break the logic. Also, a higher number of Break attempts is needed to be set in order to have above logic work properly e.g. 6 attempts every 15 minutes - > if the error is older than 60 minutes, the Break module won't perform more than 3 attempts.

I hope it makes sense.

Cheerio :cat_roomba:

You can chain two clones of the same module in the error route (of course add a sleep module to “space” them out).

Then, add a resume directive to the first two retries, and then your “alternative” path/“operator” as you wish.

In fact you can use this method to chain “fallback” modules in case one of the services are unavailable.

This is probably easier to implement because you are just cloning the original module.

(resume directives do not use operations, while data store does)

2 Likes