Permanently delete SharePoint list items using Power Automate (skip the Recycle Bin)

WARNING: Use this trick carefully. The delete action explained below cannot be undone after executed

There are some cases where it’s needed to delete SharePoint list items using a Power Automate flow. But when using the default ‘Delete Item’ action from Power Automate, it sends the item to the Recycle Bin, it’s not a permanent delete.

This could be cluttering your Recycle Bin, and also if the number of deleted items from a list in the Recycle Bin is large, it can impact the list view thresholds.

The alternative

As usual, my favourite Power Automate action for SharePoint ‘Send an HTTP Request to SharePoint’ and a bit of knowledge on the SharePoint API’s can help with that.

Instead of using the standard ‘Delete item’ action, use the ‘Send an HTTP request to SharePoint’ action, with the following parameters):

Method: Delete

Uri: _api/web/Lists/GetByTitle(‘Your list title’)/Items(<Your Item id here>)

Headers: Add the If-Match header with the value of * to ignore the ETAG validation (if this type of validation is not needed before deleting an item in your flow, otherwise you will need to retrieve the item ETAG before calling the action, and pass the ETAG in double-quotes instead)

Rest API Call ignoring ETAG
Rest API Call using an ETAG

When this action is executed in any flow, the item will be permanently deleted, and won’t appear in the First Stage Recycle bin, neither on the Second Stage Recycle bin.

References:

Working with the SharePoint Send HTTP Request flow action in Power Automate

Working with lists and list items with REST

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *