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 / 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,963 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 227

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard