Delete queue items does not empty queue

Hi Guys,

I have added a Delete Queue Items activity before adding more items to the queue to make sure I empty every new transaction in the queue before I put new ones

But this does not delete actually the items.

I have still new items in the queue from 10 hours ago, 6 hours ago, and 3 hours ago runs. But they should have been deleted obviously as I explained I have a delete all queue items activity before the adding new ones

Do you know why this does not work properly and delete everything in the queue before adding new transactions as per my process?


i believe it only deletes 100 at a time, you’ll have to delete them in a loop


Basically your get queue items has a limit of 100…so run this in a loop till you get zero items from get queue items …queueitems.count will give the count of items

Hope this helps


Hi @raool90,

You can use the logic from this useful snippet. It will ensure that you get all your interested queue items and do the required modifications on them.

Marketplace screenshot from the author.

There are a few things that you can check to see why the Delete Queue Items activity is not working as expected:

Ensure that you are specifying the correct QueueName and Orchestrator credentials in the activity.

Check that the QueueItem variable that you are passing to the Delete Queue Items activity has the correct Queue Item ID. If you are using the default Queue Item ID generated by UiPath, it may not be unique across multiple runs of the process, leading to items not being deleted as expected.

Check the filtering options that you have set for the Queue Get Transaction Item activity. It is possible that some items may be skipped during processing due to the filtering criteria.

Check if there are any other activities in your workflow that may be adding items to the queue after the Delete Queue Items activity. If so, you may need to restructure your workflow to ensure that items are deleted immediately before any new ones are added.

I hope this helps! Let me know if you have any further questions.