Delete all files of a SharePoint library and send an email using Microsoft Workflow

Microsoft Flow is cloud-based software that allows creating an automated workflow. In this blog, we are going to create a Microsoft flow that will delete all files of a document library.
 
Create A Microsoft Workflow
 
1. Go to the document library of a modern team site or communication site. If you are using classic TeamSite change it to a new experience.
 
2. Click on the flow option. From drop down select “Create a flow”.
 
 
 
3. This will open a window on left side showing all available templates.
 
 
 
4. Click on see more templates, a new page will open. Search “Delete all files of a SharePoint library and send an email” on text box.
 
 
 5. Click on the template.
 
 
 
6. If you are creating flow for the first time perform sign up
 
 
 
7. Choose region and click on Get Started Button.
 
 
 
8. Set your outlook account to connect your flow and click on continue.
 
 
 
9. Set interval time, site address, library name from which file will be deleted.
 
 
 
10. In the Send Email step, give email account, set email boby. Click on save button.
 
 
 
11. Click on Flow Checker option to check whether there is any error or not.
 
 
 
12. If there will no error, it will show 0 Errors and 0 Warning.
 
 
13. Now go to see your flow option. And select the flow and run it.
 
 
 
14. After run complete, check document library, Files were deleted from library. check your outlook mail, after files deleted there will be a mail reporting files deleted successfully from library.
 
 
 

From the above image you can see notification email about deleting all files from library showing successfully.