Hi @Itprofessional ,
Do you mean that the Departments list contains the Library name that needs to be emptied of files?
Then, according to these names, all the files in the current Library that need to be deleted.
- All you have to do is add an Apply to each outside of “Delete item“ action and use the value of Get items 2 as the traversal.
- And use "items('Apply_to_each_2')['ID']" to get item ID of the current file or folder. If Flow is executed, an error may occur, which is normal.
Delete item action does not discriminate between files or folders, if the folder is deleted first, the files inside will also be deleted. When the ID of the file inside the folder is traversed, "Item not found" is displayed.
You could ignore this error and check directly if the files have been deleted.
Image reference:

Please take a try.
Best Regards,