cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Flow and Azure Runbooks - retry the runbook

Flow and Azure Runbooks - retry the run job action

 

Hello,

 

I have a flow that in the actions it runs an azure runbook. Sometimes the runbook fails, and currently im reading the status of the job, whenever its not Completed -> im sending an email to list of recipients and flow needs to be restarted

 

Reason for the failure of the automation job can be different, sometimes its just a replication issue or its simply a transient error that gets resolved on its own ( e.g I manually re-run the job with same parameter 5 minutes later and it works as expected)

 

As I understand, I can just keep adding the same steps to the if condition ( if status not Completed -> wait 5-10minutes, run same action again, and again and again) , but there's a lot of steps and there's multiple runbooks in that flow that need to be run, therefore I am wondering if there's a better way. As in, run the runbook, if it fails, I'd configure say 3 loops. As in, if it fails, I'd like it to loop back to running the runbook part,3 times with configuered delay and only then to stop the flow. Right now its set as completed successful if any of the runbooks fail because I am checking for the status of the output of the job, and if its not Completed I am sending notification, but not sure if theres any way I could use a 'fail' status to direct it into a loop ?

 

Regards,

 

Boleslaw. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow and Azure Runbooks - retry the runbook

Hi @Gwynbleid ,

 

You could take a try with the Do until, please refer to screenshot below to create the flow:

1.png2.png

Please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Flow and Azure Runbooks - retry the runbook

Hi @Gwynbleid ,

 

You could take a try with the Do until, please refer to screenshot below to create the flow:

1.png2.png

Please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Flow and Azure Runbooks - retry the runbook

Hi,

 

Many thanks, I will test and reply here with results but this looks very promising!

 

Regards.

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,293)