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

Having trouble automating a simple approval process power automate flow.

Hi everyone, needed a bit of help running a simple process approval flow.


I am trying to run a simple power automate flow where by:

1) a change / modification to a sharepoint list column (in our case the "update date column") is requested by a user --> 2) the status appears as "under review" on the list --> 3) the list owner / moderator approves or rejects the modification made --> 4) the status of the request changes to approved / unapproved based on the outcome.  

I followed a really good comprehensive tutorial which was pretty clear to me logically and now my flow looks  something like this:

sohailsani_0-1669925765390.png

The problem with this flow: Is it does everything that is intended just that the notifications get stuck in an infinite loop and it keeps sending notifications to the approver to approve or reject even after they have already approved or rejected the change.

 

One thing important to note here is that the tutorial I followed used "ITEM IS CREATED" as the first item / command in the flow where as I have used "Item or file is modified" as that is needed in my use case scenario of "delivery date update change requests."

 

I also tried following this link mentioned below to stop the repeat requests being sent out but apparently I can either not configure correctly or it does not work in my case.

https://tomriha.com/using-version-history-to-block-approval-flow-loop-in-power-automate/


Screenshots of my flow below:

sohailsani_2-1669926528495.png

 



sohailsani_1-1669926420536.png

 

Lastly I would like to thank you in advance for taking the time to read this and helping me out, thank you I highly appreciate your help.

 

2 REPLIES 2
v-chengfen-msft
Microsoft
Microsoft

Hi @sohailsani ,

The cause of this problem is:
1. The condition of the trigger is triggered when the item or file is modified
2.Update item will cause the trigger to fire again
3. The Update item after approval will also cause the trigger to trigger the flow again.

 

I assume the approval status column(Choice column) is named status

Could you please tell me:

1.   Is this state empty if the user doesn't fill it out?
If yes,

The status will return a null value .
Please modify the trigger condition:
The flow fires when the status column is empty.

vchengfenmsft_0-1669959470502.pngvchengfenmsft_1-1669959490165.png

 

Add  Trigger Condition :@equals(triggerOutputs()?['body/status/Value'],null)

 

Best Regards

Cheng Feng

 

Hi @v-chengfen-msft , thank you for your response and taking the time to look at my problem !

Yes , I have made a status column with pills / choices --> 1) Under Review (Status is set to this status column instantly when a change is requested by a user for the "Updated Delivery Date column" so I believe there might not be a null value. The other status pills are 2) Approved and 3) Unapproved, I will still try your suggested solution and see if the repeat notifications are stop.

 

sohailsani_0-1670001956508.png


You are absolutely correct that the final outcome is also after all a status change yet again which might be causing the infinite loop, but in my case I keep getting the notifications regardless I approve or reject it from my side i.e I keep getting notifications while the status is 'under review' which is odd. I will try the suggested solution and get back to you. Thanks again.

 

Updated: I can confirm that the condition provided stopped the repeat notifications which is great ! However my situation requires that each time the "delivery update column" is updated for a specific row item the owner of the list gets a notification to approve or reject each time, so with this condition once it's approved from the owner's side another change at a later time does not send out the notification cause the status column now contains "approved"  as its status pill, I will try another expression in addition to this maybe that can get my use case to work.

Regards,
Sohailsani

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,513)