Good Afternoon. I am having trouble with an approval flow. Here is the gist of what I am trying to do:
User fills out a sharepoint form (add new item to list) with an attachment. When the new item is created, the attachment is copied to a sharepoint documents folder (access limited to approvers). This portion works.
Next, the flow has a 1 minute delay -- allowing time for the attachment copy to be executed. Then the flow does a "When a file is created or modified (properties only) action to start and wait for an approval. The approval email goes out, has a link to the document in the document library, and the recipient can review, the file, make changes, save it, etc. This also works.
Next, the approver returns to the approval email and decides whether to approve or reject. Upon approval, the file is moved into a different sharepoint document folder that is accessible to anyone who uses the site. This move also works just fine.
When an item is approved, there is also an update item action to go back and update the original sharepoint list to set the Date of Approval and move the status to approved. This does not work.
On the approval response of reject, there is an update item for the original sharepoint list to update the Status to rejected. This also does not work.
I am stumped as to why. Below are some screen grabs of the flow. Any insight would be much appreciated.
Your issue is that in your condition you are looking at Responses and going into a loop.
You need to check the Outcome for Approve or Reject - Not Responses. That will also eliminate the need for the loop.
Let me know if you need more help.
Hi @MattH2 ,
As suggested by @ScottShearer , if you want to get approval results, please use outcome.
Please check this similar thread and see if it helps:
Thanks @ScottShearer. That definitely simplified the flow and removed a couple of loops. Unfortunately, I am still having an issue where the "Update Item" is not working for either approve or reject and FLOW is forcing me to put the "Start and Wait for Approval" into an Apply to each. I suspect that my issue is tied to the "Update Items" looking to update the original Sharepoint list while the "Value" that I am looping on is from "When a file is created or modified". As an experiment, I tried testing the flow with "Body" instead of "value" for the Apply to each that is wrapped around my Approval.
My move file executes correctly, but neither update item (approve or reject) ever executes and the Test Flow just continues to run. Appreciate the help.
I believe that you'll have success if you eliminate the Apply to each 2 loop and place your approval directly below the trigger. See my screen shot below.
Also, while there is nothing technically wrong, it is unusual to have a second trigger inside of a Flow. You may want to consider moving the trigger and approval actions to a separate Flow.
I think I am going to have to split into 2 flows. FLOW is forcing an "Apply to Each" whenever I select an item from the dynamic content for "When an item is created or modified". I want to include a link in the Approval email for the approver to open and edit the document. I cannot figure out how to avoid that.
I actually considered the 2 flow approach initially, but had 2 concerns.
1) How do I avoid creating a flow loop I cannot escape? I.E. File is created > Flow starts > Approval Email sent with link to edit file > File is edited and saved > Flow starts on file modified. I am really struggling with the logic on this one.
2) How do I go back and update the correct record in the original sharepoint list? The only information I have would be the Attachment that got saved to a directory - which could, technically, be changed.
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
We've given our badges an overhaul and also added some brand new ones!
Learn how to build the business apps that you need.
Find out where you can attend!
Watch & learn from the Power Automate Community Video Gallery!