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

Cant delete a SharePoint File Dynamically



I've been stuck on this all day and can't seem to get past it.


I have a file I need to select dynamically, from a SharePoint Library and delete it (sounds easy).


I have also tried it so the file path (file path is saved in a sharepoint list) is coped in to the file identifier, no luck.


My flow is below, it works until I pass the delete output the file identifier. Any other solutions would also be appreciated.







I've also tried this solution to change the file identifier to a uri with no look:

Solution Sage
Solution Sage

Hi @thomas1992UK 

Have you tried using the SharePoint REST API to delete the file?

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
New Member

This worked for me:
You need to replace the backslash / in the URL with %2F when you type in the file identifier or when using dynamic content to as the file identifier.
See explanation here

Thanks, that really helped me.😀

Helpful resources

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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (2,466)