cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vincentakatoh
Level: Powered On

Flow and SharePoint List- Status

Hi, 

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). 

 

Que:

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)

5 REPLIES 5
Community Support Team
Community Support Team

Re: Flow and SharePoint List- Status

Hi @vincentakatoh,

 

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:28.JPG

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:

  • Add a "When an item is created" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @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:29.JPGThe flow works successfully as below:30.JPG

Best regards,

Kris

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vincentakatoh
Level: Powered On

Re: Flow and SharePoint List- Status

@v-xida-msft

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.

https://www.o365dude.com/2016/05/07/making-a-vacation-request-flow-with-microsoft-flow-preview/?utm_...

 

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". 

 

 

rgds, 

Vincent 

vincentakatoh
Level: Powered On

Re: Flow and SharePoint List- Status

@v-xida-msft

 

A flow diagram of the flow that I want to create. 

 

2018-01-25 20_18_32-Start.jpg

Highlighted
Lexnnn
Level: Powered On

Re: Flow and SharePoint List- Status

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.

flow1.PNGflow2.PNGflow3.PNGflow4.PNGflow5.PNGflow6.PNGflow7.PNGflow8.PNG

Don't know if all these steps are needed but it works for me.

Hope this helps!

Administrator
Administrator

Re: Flow and SharePoint List- Status

Hello,  @vincentakatoh!

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!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,371)