Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

When a file is deleted in a SharePoint folder, delete file with the same name in a different SharePoint site folder


I have successfully completed a copy flow that will copy files that are created or modified in the originating SharePoint folder to a destination SharePoint site's folder. Now, I attempting to created a flow that will delete the file in the destination site's folder when it is deleted in the originating SharePoint site's folder. 


I reviewed a post from 2018 where someone was attempting the same flow (When a file is deleted in a SharePoint folder, del... - Power Platform Community ( I have tried what was suggested (add an action to 'get folder metadata using path') unsuccessfully. I BELIEVE the problem is using the correct folder path for the Recycle Bin since the response is 'File not Found'. I've tried 'Trash', 'Recycle Bin' and the path that I see in the URL when I visit the Recycle Bin (/_layouts/15/).  (Screenshot below) So far, everything fails at the 'get folder metadata using path' action. 





Any help or advice would be greatly appreciated. 




Solution Sage
Solution Sage

Hi @Dana_L ,


You can use the SharePoint API to query the recycle bin using oData.






If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Hi @eric-cheng,


Thank you for your response. First, I'd like to admit and apologize for being a beginner!!

I'm editing my first reply since I made a rookie mistake and didn't follow your instructions to the letter. 

After making the corrections, the the 'Send an HTTP request to SharePoint' processes successfully. However, I'm now receiving a 404 error on the Delete File action - 'The response is not in a JSON format.' and 'The resource you are looking for has been removed, had its name changed or is temporarily unavailable.'  

When I view the output results from the 'Send an HTTP request to SharePoint', the site address and file identifier are correct. I'm able to copy and paste those into a browser window and the file is accessed. 

Any thoughts on why I'm getting this new error?

Thanks for your time and help,


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,954)