If you're a developer just looking to clear an account's approvals (approve or reject, not delete), then this script will work. I created a loop that just uses jQuery to approve each card by simulating button clicks and pauses. I had over 400+ approvals to clear and it only took a few minutes. You have to be on the Flow approvals page that displays the cards to run it.
If you need to reject cards you can change
button:first-child
to
button:last-child
Here's the code:
//Get all approval cards on the page
var appCards = jQuery('.approval-card .actions > button:first-child');
var i = 0;
(function approveCard() {
//Pause for each approval
setTimeout(function () {
//Approve the card
appCards.eq(i).click();
//Wait for panel to open
setTimeout(function () {
//Confirm approval
jQuery('.confirmSection .fl-NgReactDefaultButton > button').click();
}, 2000);
//Go to next approval card
i++;
//If there are more cards, approve the next one
if(i < appCards.length)
approveCard();
}, 2000)
})();