I'm using a Sharepoint list. Trying to use Flow to create a approval flow with status tracking
1) Sharepoint- When an item is created or modified
2) Send approval email (Approve, Reject) -[request for approval]
3) Condition "SelectedOption-> is equal to -> Approve
a) If yes, i) update item (status = approve) and ii) Send an email- Approved email
b) if no, i) update item (status = reject) and ii) Send an email- Rejected email
Problem: Currently after 3a/b, I receive 2 emails from:
3) a/b: this is ok
2) approval email again: This is NOT ok. Flow is triggered again since status is updated (modified).
i/ How can i modify my flow such that I only recieve 1 email.
ii/ After 3b, if task owner update list again, I need to re-trigger (1)
Could you please share a bit more about your SharePoint list?
Further, could you please show a bit more about the task owner?
I suppose that you have created a custom column called Owner to store the owner of the task and the Owner column is a Person or group type column. I have create a SharePoint list and the data structure of it as below:
Note: TaskName column is Single line of text type column, Owner column is a Person or Group type column, Due Date column is Date and Time type column and Status column is a Single line of text type column. The default value of Status column is null.
For your first question, I have made a test on my side and please take a try with the following workaround:
@or(empty(triggerBody()?['Status']),not(equals(triggerBody()?['Author'], triggerBody()?['Editor'])))Within "If/yes" branch of Condition, add a "Start an approval" action (I have not found the "Send approval email" action within Outlook connector, I use this action instead of "Send approval email" action for testing).
Add a "Condition 2", left input box set to Response dynamic content, right input box set to Approve.
Within "If/yes" branch of Condition 2, add a "Update item" action, then add a "Send an email" action (Approved email).
Within "If/no" branch of Condition 2, add a "Update item" action, then add a "Send an email" action (Rejected email).
Image reference:The flow works successfully as below:
Thanks for the response.
1) The condition did stop the flow from re-firing after the status is updated.
2) Nonetheless, I need to re-fire the flow when "requestor" modifies the list (ie. resubmit for approval).
The flow I wanted to create is similar to below post.
But In addition, when the manager rejects the request, an email to send to requestor to modify request. When requestor modifies the request, the flow fires again. This is repeated until the manager approves the request.
I do not have a column "owner".
I have an approval list for creation of new O365 groups.
I wanted to approve the list items directly from the email using flow.
I tried out myself but for some reason it did not work but using the method described below, I was able to do it. Thank you to the author!
Found this solution: https://www.techmikael.com/2018/05/use-microsoft-flow-to-implement.html#comment-form
I tried it out, I also works for me for approval of Sharepoint list items. Really helpful since microsoft has not implemented list items in "set content approval status".
Note: this solution is for Lists where Approval is enabled and the field is not a manually created field but maintained by the system so you can not use it in Flow.
Note: the approval process can take some time, for test purpose, wait multiple hours, first time took time for some reason, now it works fine.
Note: In "set content approval status", in Library name use List name but not the one from the URL
eg. https://...sites/teamsites/team-orders and the list name is Team orders, use Team orders as library name and not team-orders.
I though of using PATCH function to update the "approval status" field instead of "Set content approval status" but I lack the developers knowledge to write the command.
Don't know if all these steps are needed but it works for me.
Hope this helps!
Have you had an opportunity to apply @Lexnnn‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!
Thank you for being an active member of the Flow Community!
Flow Community Manager
Look out for new contribution recognition badges coming SOON!
Join us for the first ever Power Platform Online Conference!
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!
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!