How do I set up a re-application flow (to avoid an endless loop) after a SharePoint list item has been rejected once in the approval flow in Power Automate?
I would appreciate any examples.
Hi @MO_912 ,
Here's a simplified example in pseudo-code:
Trigger: When an item is created or modified
Initialize rejectionCount = 0
Approval Step:
If Approval Rejected:
Set rejectionCount = rejectionCount + 1
Update SharePoint item with rejection information
Check Rejection:
If rejectionCount < MaxAttempts:
Re-Application Loop:
Create New Approval for the item
Wait for Approval Response
If Approval Accepted:
End Loop
If Approval Rejected:
Set rejectionCount = rejectionCount + 1
Update SharePoint item with rejection information
Else:
Notify user that maximum attempts reached
@MO_912 You can make good use of different ''status'' values in order to do that. Depending on a specific value status you could initiatie specific flows. Make sure to set the trigger conditions of your flows, since your flows will otherwise always run on row modification!
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional