# Queue tools

> The Create queue item and Create and wait for queue item nodes, which add a work item to a queue so that robots can process it.

## What it does

A queue holds work items that software robots process one by one. The queue nodes work with a queue from a workflow. To find them, search for **queue** in the **Add node** panel. The search lists **Create queue item**, **Create and wait for queue item**, **Delete queue items**, and **Set transaction status**. The first two add a work item to a queue, which distributes work to robots:

- Create queue item: adds the work item and continues immediately, without waiting for the result.
- Create and wait for queue item: adds the work item and pauses the workflow until a robot has processed it. The processed result is then available to the nodes after it.

## When to use

- Use **Create queue item** to hand work to robots when the workflow does not need the result.
- Use **Create and wait for queue item** to hand work to robots and use the result before continuing.
- **Delete queue items** and **Set transaction status** are also in the Add node panel. This page doesn't describe them yet.
- To start a known process directly with known inputs, use the [RPA Workflow](node-rpa-workflow.md) node.
- To go through the items of a list one by one inside the workflow, use the [Loop](node-loop.md) node.

## Configuration

| Field | Required | Description |
|---|---|---|
| Queue | Yes | The name of the queue that receives the work item. |
| Item data | No | The JSON payload of the work item. JSON is a text format for structured data. |
| Priority | No | `Low`, `Normal` (the default), or `High`. |
| Reference | No | A tracking reference for the work item. |
| Defer date | No | The earliest time to process the item, in ISO 8601 format. |
| Due date | No | The deadline for processing the item, in ISO 8601 format. |

The **Create and wait for queue item** node reads the same queue and item data fields.

## Output

The nodes continue along the success path once the work item is created. For **Create and wait for queue item**, the processed result is available to the nodes after it as `$vars.<nodeName>.output`. If the queue operation fails, the error is available on the **Error** handle, as [Error handling](flow-error-handling.md) describes.

## Common causes of problems

- The queue is not found: the queue name must match an existing queue exactly.
- The item data is not valid JSON: the item data must be a JSON object.
- The queue item stays unprocessed: no robot is available to process it.
- The workflow waits too long: the robot takes longer than expected to process the item.

## Next steps
- [Loop](node-loop.md): going through a list of items in a workflow, which fits adding one work item per item.
- [RPA Workflow](node-rpa-workflow.md): starting a process directly.
- [Error handling](flow-error-handling.md): routing a failure to an error path.
