Good Day,
I have a flow created that should update file properties on SharePoint after specific conditions are met. The issue that I am facing is that it runs the flow and the updates are made, however, the flow keeps looping/running and asks me for approval after it has been granted.
I've tried using the control Terminate, however that still doesnt help.
Hi @Kmakhanya,
Thanks for your response.
For now I would try the service account approach suggested by Paul if I were you. That is probably the easiest to implement in your setup.
Btw, I was looking for the raw outputs. That should be visible when you click on the Click to Download hyperlink in the first screenshot of your last response.
@Expiscornovus, so the flow runs successfully and indicates that it succeeded. A little while later it runs again and wants me to approve/reject the request.
To answer your first question, no its not a typo. When I receive the approval request on Teams, I can either select approve, reject or cancel request. The Outcome is reading what I select
Hi @Pstork1, thank you. I will attempt this and let you know.
Thanks for sharing @Pstork1, that is definitely a great approach, a trigger condition based on the modified by field.
I was trying to find a solution with the current setup, a trigger condition based on the status field. However, I was still collecting all the details for that 😁
Normally to solve this you need to add a trigger condition that prevents the flow from running a second time. The easiest way to do that is to create the flow using a service account and then add a trigger condition to keep it from firing if the Modified By field is the service account. You can get specific details here:
How to avoid infinite trigger loop in Power Automate (tomriha.com)
Hi @Kmakhanya,
Just to double check. I see you are setting the items to either Approved or Rejected in the update file properties action. However, in your condition action your are using the values Approve or Reject. That looks like a typo, is that correct?
Secondly, I was looking for the values which you were using. You can see those when the flow has run. Go to the history of the one which was failing/didn't work property. Expand the trigger action and look at the outputs (I said inputs in my previous reply, I should have said outputs 😁)
Sorry, please swap the second and last image (with regards to the order)
Hi, please find below screenshots
Hi @Kmakhanya,
Ok, thanks for clarifying that.
In that case can you share a screenshot or just copy/paste the raw inputs of one of the flow runs which shouldn't happen. So, we can check which values it had and why it is still meeting your condition action and asking for approval.
Yes, there is a field in SharePoint called "must it be approved"
No, that field doesnt need to be updated. The flow should only run if the following conditions are met on sharepoint:
(1) "Status" field is equal to Final
(2) "Must it be approved" field is equal to Yes
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional