Approval Flow to Delete a File from Document Library from SharePoint

I have created an approval flow that confirms the deletion of any file from a document library. When a file is deleted it will send an approval email to the approval user to approve/ reject the deletion.

When he rejects it should put back the file into the document library. when the flow comes to restore the file from the Recycle Bin it does not execute this step. !

here is my workflow:

enter image description here

SharePoint Asked by Fatimah Mohmmed on December 28, 2020

2 Answers

2 Answers

Agree with Akshay's opinion, you will need the recycle bin item id to call the http request.

First you need to call the rest Api to get the ID and use that id to restore. I tested and succeed. enter image description here

Correct answer by Jerry_MSFT on December 28, 2020

Instead of deleting file and than restoring it back, it would make more sense to remove this file from library after Approval. If you don't want to display the file just create a column e.g. PendingForDeletionApproval and filter the View based on that. Once it is approved you can remove from Library as well as recycle bin if needed.

Now to answer your issue why the file is not restored. Its not clear from your screenshot but I assume the ID parameter you are using for Restore is the from Document library, while the API needs item ID from Recycle bin which is not same as that of document library.

Answered by Akshay Randive on December 28, 2020

Add your own answers!

Related Questions

Can I change favicon without modifying the master page?

3  Asked on January 4, 2022 by default_noob_network


Add link to button in infopath

1  Asked on January 4, 2022 by j-choe


Get Page Field Values with javascript

2  Asked on January 2, 2022 by rothrock


I’ve sharepoint 2013 farm last updated June 2014

1  Asked on December 31, 2021 by ahmed-alsharkawy


Ask a Question

Get help from others!

© 2022 All rights reserved.