Hey @dophaminum and @rosewaterbrands You need to build a recursive workflow (one that loops on itself until there are no more records).
Start with a button in an admin page that just triggers a backend workflow
Your workflow has just 3 steps,
-
Find the first item to delete
-
Delete that item (only if the search returns an item to delete)
-
Reschedule the workflow to start again
Note I have an option set (Heavy, Medium, Light) that has numeric values I use to tune the loop speed. This is a simple loop so the delay is .4 seconds.
I can get this loop to delete about 4.2K records per hour and will give you around a 40% server load with the delay above.
I typically use a set for delete flag to mark the records so they don’t show (which is instant to the user) , then run the delete at night so it doesn’t overload the system (you just schedule the first workflow to run that evening and the loop takes care of the rest)
Best of luck!
You need to loop like this rather than work on a list as the number of variables you are passing (your ID’s of the records) is too big to do this any other way.