Work queues actions
Work Queues in Power Automate can be used to store process-relevant data and provide a way to decouple complex processes and automations, allowing them to communicate asynchronously.
Work queues can play a crucial role in improving the efficiency, scalability, and resiliency of automations and help prioritize work. Work queues allow you to complete highest-priority items first, regardless of whether they're processed by digital workers, human workers, or through integrations.
Note
- Production-level support for the first set of work queue-related actions requires Power Automate desktop version 2.37 or later.
- Work queue actions in Power Automate for desktop is a premium feature, which requires a Power Automate subscription.
- Currently only Process work queue items and Update work queue item actions can be classified and allowed or restricted through data loss prevention (DLP) policies, with other actions following soon. Note that cloud flow-based usage of work queues can't be restricted by DLP policies.
Process work queue items
The Process work queue items action indicates to the queue orchestrator that the machine is ready to process one or more work queue items. The user context requesting a new item needs to have sufficient privileges on the work queue and work queue items table in order to process work queues.
The work queue referenced in the previous action is used by the queue orchestrator to determine the next available items in that work queue that are in Queued state. As the desktop flow steps through the actions within the Process work queue items loop that this action renders, you can call on the value by utilizing the variable you have designated for the action along with the property .Value
. In this case, you could call the value of the work queue item using the variable %WorkQueueItem.Value%
Processworkqueueitemaction
The Process work queue item action action requires the following arguments.
Input Parameters
Argument | Optional | Accepts | Default Value | Description |
---|---|---|---|---|
Work queue | No | Text | The work queue ID of the work queue that contains items to process | |
Overwrite work queue auto-retry configuration | Yes | Boolean | False | When enabled, a field appears allowing you to set or overwrite the maximum number of retries for IT Exceptions . |
Max retry count | No | Text value, Numeric value | The maximum allowed number of retries for IT Exceptions . This parameter lets you adjust the retry count to a higher or lower value, or even disable the retry mechanism by setting the count to 0. |
Variables produced
Argument | Type | Description |
---|---|---|
WorkQueueItem | No | Information stored in the work queue item being processed |
Exceptions
Exception | Description |
---|---|
Work queue not found | The value entered into the work queue parameter is invalid |
Failed to process work queue | Bad request - error in query syntax |
Update work queue item
The Update work queue item action allows users to change the status and processing results of the selected work queue item.
Updateworkqueueitemaction
The Update work queue item action action requires the following arguments.
Argument | Optional | Accepts | Default Value | Description |
---|---|---|---|---|
Work queue item | No | Text | Work queue item variable that has been previously returned by the queue orchestrator | |
Status | No | Processed, Generic Exception | Processed | Update the work queue item being processed using a status from the list of options. |
Processing notes | Yes | Text | Custom processing notes or value to append to the queue item being processed. | |
Clear processing notes | Yes | Boolean | False | When enabled, hides and clears the processing notes field on this screen and removes any processing notes from the database that have been previously captured for this item. |
Exceptions
Argument | Description |
---|---|
Work queue item not found | The work queue item being processed has either been deleted or no longer belongs to the queue that it was called from. |
Work queue item on hold | The work queue item being processed contains a status of on hold in the queue orchestrator and can no longer be updated. |
Failed to update work queue item | The work queue item being updated has encountered an unexpected error. Check the error message for more details. |
Add work queue item
The Add work queue item action allows users to populate work queue items into a work queue, which has been set up in the flow portal.
Addworkqueueitem
action
The Add work queue item action requires the following arguments.
Input Parameters
Argument | Optional | Accepts | Default Value | Description |
---|---|---|---|---|
Work queue | No | Text value | The work queue item to add the item into | |
Priority | No | High, Normal, Low | Normal | The priority to set the work queue item to |
Name | No | Text value, Numeric value | Custom name or ID for the new work queue item | |
Input | No | Text value, Numeric value | The data, which belongs to the value column to be processed | |
Expires | Yes | Datetime | The datetime value set to expire the queue item, otherwise adopts the default value if one is set for the queue | |
Processing notes | Yes | Text value, Numeric value | Custom processing notes to be added to the new queue item | |
Has unique id or reference | Yes | Text value, Numeric value | When enabled, a value should be provided that is unique within this queue. If left empty, a unique value in the format of system-<GUID> is automatically provided by the system |
Variables produced
Argument | Type | Description |
---|---|---|
WorkQueueItem | No | Information stored for the work queue item being added |
Exceptions
Argument | Description |
---|---|
Work queue not found | The value entered into the work queue parameter is invalid |
Failed to add item into work queue | The work queue item couldn't be added into the work queue. Bad request - error in query syntax |
Requeue item with delay
The Requeue item with delay action allows users to readd a queue item being processed in the desktop flow, back into its originating queue. In addition, the queued item can be held and released until a defined time.
Requeueworkqueueitemaction
The Requeue item with delay action requires the following arguments.
Input Parameters
Argument | Optional | Accepts | Default Value | Description |
---|---|---|---|---|
Work queue item | No | Work queue item | The work queue item to add the item into | |
Delay until | No | Datetime value | Normal | The datetime value applied to delay the queue item until |
Expires | Yes | Datetime value | Custom expiration time for the item being requeued | |
Processing notes | Yes | Text value, Numeric value | Custom processing notes to be added to the new queue item | |
Clear processing notes | Yes | Boolean | False | When enabled, hides and clears the processing notes field on this screen and removes any processing notes from the database that have been previously captured for this item |
Exceptions
Argument | Description |
---|---|
Work queue not found | The value entered into the work queue parameter is invalid |
Work queue item not found | The queue item value is invalid |
Failed to requeue work queue item | The work queue item couldn't be added into the work queue. Bad request - error in query syntax |
Update work queue item processing notes
The Update work queue item processing notes action allows users to update or clear processing notes of the selected work queue item without changing its state or any other property.
updateprocessingnotesaction
The Update work queue item processing notes action action requires the following arguments.
Argument | Optional | Accepts | Default Value | Description |
---|---|---|---|---|
Work queue item | No | Text | Work queue item variable that's been previously returned by the queue orchestrator | |
Processing notes | Yes | Text | Custom processing result or value to append to the queue item processed | |
Clear processing notes | Yes | Boolean | False | When enabled, hides and clears the processing notes field on this screen and removes any processing notes from the database that were previously captured for this item |
Exceptions
Argument | Description |
---|---|
Work queue not found | The work queue associated with the item has either been deleted or is no longer accessible |
Work queue item not found | The work queue item is invalid |
Failed to append the processing results | The work queue item being updated has encountered an unexpected error. Check the error message for more details. |