Symptoms
You run a Clean version history quick action on folders and get the following error:
System.InvalidOperationException: No transformation template for ListItem.
Details
You can only run the Clean version history quick action on documents; you get this error whenever you try to run it on folders.
You can use a custom report to run Clean version history on documents within your folders with these steps:
Select All reports from the sidebar.
Click Create custom report.
Select Document from the Object type dropdown.
Click Continue without saving.
Navigate to and select your scope for the Clean version history action.
If you select a library, this will pull all the documents within all your folders for that library.
Click Next.
Click Run now.
Select your items.
Select Clean version history from the quick actions menu to run the quick action.
For more information, see Clean version history.