Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Triggers
  • Resources
  • ABOUT ME
  • Get help with your flow
Menu

Build a ‘restartable’ approval flow in Power Automate

Posted on April 16, 2023April 16, 2023 by Tom

“On each error I must restart the whole flow, is it possible to build a ‘restartable’ approval flow that’ll continue from the failed step in Power Automate?”


When building approval flows in Power Automate, you probably put all the steps in a single flow in a sequence. Assign an approval task to a user and once completed assign another one to the next approver. The same steps over and over again until everyone completes their approval task. But what if such flow fails? What if 2 approvers already approved and it failed during the 3rd approval? How do you restart this flow without creating the tasks for the first two approvers again?

Use a ‘state machine’ in your flow

Since you don’t want to create the same approval tasks for the users, you’ll need two things. Firstly, you must keep the information about the current approval step. Secondly, your flow must act based on this information when started.

The first prerequisite is simple – this article is about an approval flow, and each approval flow should utilise some ‘Status’ column with such information. If you don’t have a unique status for each approval step, you should add it now.

The second part of the solution is a bit more complicated. As already mentioned, the flow must act differently based on the stored information, in this case the approval status. Once it’s started it must check the current status to know where to continue – a use case for a state machine!

Following the state machine principle, you can build a flow that’ll trigger on a change in the status column. Depending on the approval status value a ‘Switch’ will store the current approval role in a variable.

Power Automate restartable approval

Use it to find the current approver in a configuration list and assign the task. Once completed store all the information back to the item itself and set the next approval status.

A new instance of the flow will trigger, checking the new status and creating a new approval task for the next approver.

Summary

When building a restartable approval flow in Power Automate, you must somehow deal with the steps that were already completed. In this article it was done using a state machine, a repeated flow that’ll trigger multiple times during an approval process, each time creating task for a different user.

Just remember that the flows don’t share any information. If there’s any information that should be shared between the approval steps, e.g. the approval history, you must store it in the item itself as part of the flow.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


There's also the HTTP requests to SharePoint cheat sheet to help you overcome limitations of some standard actions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with 1000s of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes