When you build a script, you should use Automai’s “OnFailure” feature to instruct the bot what to do in case of failure.

You may want it to:

  1. log out,
  2. execute another script,
  3. close the application,
  4. recover (eg close a pop-up window) and resume, or
  5. carry out a specific set of actions (best to save these as a global script to be reused).

In this video, you will see how to use the OnFailure feature to give a set of actions for the bot to execute when there is a failure during a workflow.