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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate - Send ...
Power Automate
Unanswered

Power Automate - Send an HTTP request to SharePoint - Preserving Deleted Files in Sharepoint

(1) ShareShare
ReportReport
Posted on by 6
Hello, I'm trying to emulate the flow shown below to move files that are deleted to a seperate Library instead.
It grabs the files recently added to the recycle bin, restores them, then moves them to a different library/folder.
 
 
My Issue is that the "Send an HTTP request to SharePoint" is only picking up files I have deleted, I need it to pickup the deleted files no matter who deleted them.
I have increased the "Subtract from Time" to 3 hours to check, and I can clearly see files that have been deleted by my collegues within the timeframe.
 
See URI and JSON below
 
What the full flow should look like; I had it all setup and it was working fine (for files I deleted), but for testing I've deleted all after the HTTP request for now as I can see the problem is there.
Screenshot of a Power Automate workflow for detecting a file that is being deleted on a SharePoint Online site and moving it into a custom Recycle Bin. The workflow triggers when a file is deleted, restores the file to its original location, moves it to a custom Recycle Bin, and finally adds the value of the Original Location to the file in the custom Recycle Bin.
 
 
URI;
_api/web/RecycleBin?$filter=DeletedDate ge datetime'@{body('Subtract_from_time')}'
 
JSON;
  
{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "__metadata": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "uri": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    }
                }
            },
            "Author": {
                "type": "object",
                "properties": {
                    "__deferred": {
                        "type": "object",
                        "properties": {
                            "uri": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "DeletedBy": {
                "type": "object",
                "properties": {
                    "__deferred": {
                        "type": "object",
                        "properties": {
                            "uri": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "AuthorEmail": {
                "type": "string"
            },
            "AuthorName": {
                "type": "string"
            },
            "DeletedByEmail": {
                "type": "string"
            },
            "DeletedByName": {
                "type": "string"
            },
            "DeletedDate": {
                "type": "string"
            },
            "DeletedDateLocalFormatted": {
                "type": "string"
            },
            "DirName": {
                "type": "string"
            },
            "DirNamePath": {
                "type": "object",
                "properties": {
                    "__metadata": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string"
                            }
                        }
                    },
                    "DecodedUrl": {
                        "type": "string"
                    }
                }
            },
            "Id": {
                "type": "string"
            },
            "ItemState": {
                "type": "integer"
            },
            "ItemType": {
                "type": "integer"
            },
            "LeafName": {
                "type": "string"
            },
            "LeafNamePath": {
                "type": "object",
                "properties": {
                    "__metadata": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string"
                            }
                        }
                    },
                    "DecodedUrl": {
                        "type": "string"
                    }
                }
            },
            "Size": {
                "type": "string"
            },
            "Title": {
                "type": "string"
            }
        }
    }
}

EDIT**
I am Owner of the Sharepoint Site in question so have full control there.
I am not 365 admin of any type.
If its required, I can have my boss link his 365 admin user to the flow if that would sort the issue, he is a 365 Global Administrator.
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,499 Super User 2025 Season 2 on at
    Hi
     
    Are you an admin?
  • JB-16080034-0 Profile Picture
    6 on at
    @FLMike
     
    I am Owner of the Sharepoint Site in question so have full control there.
    I am not 365 admin of any type.
    If its required, I can have my boss link his 365 admin user to the flow if that would sort the issue, he is a 365 Global Administrator.
  • ID-02091011-0 Profile Picture
    2 on at
    Use "_api/site/RecycleBin" instead of "_api/web/RecycleBin" then it should return all items. Worked for me trying to find system deleted items.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard