cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Flow Fails on Delete Item Action

I have a flow where when an item is created in a SharePoint list, the oldest item in that list is queried (via the Get items action). The flow then recreates that item in another SharePoint list and deletes the item from the SharePoint list that it is queried from. Below is a picture of the flow:

2019-03-18_13-54-07.jpg

This flow very commonly fails on the delete item action with the error message ""Item not found." If I resubmit the flow after it has failed, the flow succeeds. Does anyone know why this might be happening and/or how to fix it so that this flow does not fail and have to be resubmitted?

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Flow Fails on Delete Item Action

Hi @CLS720 ,

 

It seems that the trigger is only used to trigger Flow, and has nothing to do with the execution of the following action.

Then the problem may be that you have an error when configuring the item ID.

I noticed that there are three IDs to choose when configuring Delete item action. This is where you need to focus.

If you want to delete the item in the corresponding List in Get items action, Please use the Dynamic content corresponding to Get items action.

Image reference:53.PNG

 

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: Flow Fails on Delete Item Action

Hi @v-bacao-msft,

 

I can confirm that the delete action is using the correct item ID (items('Apply_to_each')?['ID']).

 

Any other suggestions as to why this workflow frequently fails? I also tried putting in a delay, but that did not resolve the issue.

 

Thanks,

 

Chris

Highlighted
Advocate I
Advocate I

Re: Flow Fails on Delete Item Action

I submitted a premier support ticket and it looks like the cause of the failures is because the flows are running simultaneously. See comment from product group below:

 

"Looking at the customer's flow and the errors we are seeing in the logs some of these failures are caused by simultaneous running flows.  If the Get Items action retrieves the list of items while a previous flow run has not completed deleting items it is processing then it makes sense that a second delete on the same item would error with a 404.  It's also possible that creating the same item in the second list will result in errors or duplicate items."

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Users online (8,385)