web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / My flow fails to updat...
Power Automate
Suggested Answer

My flow fails to update a row, but after resubmit works fine usuallly

(0) ShareShare
ReportReport
Posted on by 4
Hello guys, 
 
I couldn't find solution for my flow. 
 
Basically what it does: 
 
The flow runs daily(scheduled), retrieves records from a database, and processes them in a loop. For each item, it checks and updates related SharePoint list entries, then attempts to synchronize IDs between SharePoint and the database.

 

 

The flow consistently fails at the action:

Where I need to update a row and set id for SharePoint. the error is  400, specified item is not found. But the main thing is that usually it goes ok for 100-150 items. Then fails to update for 30-60 items. And goes ok until the end for rest 300-500 items.

 

I tried to put delay before update, also I tried to do Concurrency control to 1 for the apply to each.

 

 

 

I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    Based on what you describe, there are items in the database that are not in the SharePoint list. When the flow runs and the flow cannot find the matching item, it fails.
     
    You could add a Get items action before the update item action. In the Get items action use a filter query to find the item you are about to update. Use a condition with a length() expression to determine how many items the Get items action found and that it is greater than or equal to 1. Then move the update item action to the yes side of the condition with nothing on the no side. This way the missing items will be skipped.
     
    A better and more robust solution would be to use a tool such as Layer2 Cloud Connector. It is designed specifically for keeping data sources in sync with SharePoint. With that tool, it could either skip the missing items or delete them depending on how you configure the sync. See Layer2 Cloud Connector â–º integrate and sync data for information on this tool.
  • Flowss Profile Picture
    4 on at
    It doesn't find the table inside the database instead of items. 
     
     
    Error code is 400
  • Suggested answer
    ninihen Profile Picture
    153 on at
    Not sure if I read it correctly but if you loop every item in a single for each, that probably can be improved.

    Assuming you are calling Update on items that don't exist in the SP list like @David_MA said, the failing items are likely DB records that should be Created in SP, not Updated

    So instead of loop DB records and update each, classify them first.

    1. Get items from the DB (you already have it)
    2. Get items from SP (all of them at once)
    3. Build three arrays via Filter array:
      a. Update = items present in both, where something changed
      b. Delete = items in SP bit no longer in DB
      c. Insert = items in DB but not yet in SP
    4. 3 independent Apply to each loop, one per array. So if nothing changed, no need to loop & process.
     
  • Flowss Profile Picture
    4 on at
    So basically: 
     
    1) I take data from database get rows. 
    2) I check if my some of my SharePoint lists have already that value or not.
    3) And then I upload that SharePoint list ID to database items. 
     
    P.S this flow is not made by me, got it to service. So some things might be unclear.
     
    My biggest guess is that the flow fails because of database connection loss. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard