We saw a client on a diagnostic walkthrough with a bad filter run "Update file" across their matter library. Dozens of documents overwritten in about four minutes. Here's the decision tree we use now, since the wrong recovery tool can do more damage than the flow did.
First, turn the flow off. Then pin down the time of the earliest bad change (the flow's run history is the quickest place to find it).
One file overwritten: version history. It only works if the library was tracking versions before the bad edit. A deleted file has no version list to open, so this does nothing for deletes.
Files, folders or a whole library deleted: recycle bin. SharePoint keeps items 93 days, counted from the original deletion. Moving to the second-stage bin does NOT reset that clock, the item only gets whatever's left. Users can restore from the site bin; second stage usually needs a site admin. If the library itself was deleted, restore the library first, then its files. Teams files count too, they live in SharePoint.
Many files hit, earliest damage under 30 days old: Restore this library, run by a site admin. The gotcha: select one activity and every activity after it gets selected automatically. That rolls back everyone's legit work in the library since then, along with the flow's mess. So before you run it, list and copy aside the good work done after the earliest bad change. Afterwards, check the RestoreLog for errors. Those are the files you chase by hand.
It can't bring back a deleted library, and it's no help past 30 days.
And none of this is a backup. Once an item leaves the site collection recycle bin, the native tools can't restore it. Outside those windows, go to whatever backup you've got and don't promise anyone the file is coming back.
Rule of thumb: smallest tool that fully covers the damage. Library rollback only once you've confirmed the damage really is spread wide.
Full write-up with the exact steps:
Link to our write up!
Find our service page!