Today I created a workflow that needs to delete all documents matching certain criteria in my SharePoint Online based document library.

So I simply dragged in the Office 365 delete items action into my workflow.



Easy! Or maybe not?

In my case my I wanted to delete all documents where a status field was set to Archive.

While I was developing the workflow there was no document with the status of Archive and I found that the workflow gave me an error

Unable to find list item to delete.

Hmm, there are no error handling option on this action and my workflow is falling over.

So I added a query list action to check how many items there are to be deleted.


So by checking if there is anything to delete the error is now avoided and my workflow runs successfully.

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d bloggers like this: