Registry / workflow / robocorp-workitems

robocorp-workitems

JSON →
library1.5.0pypypiunverified

The `robocorp-workitems` library is part of the Robocorp ecosystem, providing utilities to manage data flow between tasks in a Robotic Process Automation (RPA) workflow. It allows robots to read input work items and write output work items, facilitating the transfer of structured data, files, and assets. The current version is 1.5.0, and it's actively maintained as part of the broader Robocorp platform.

pip install robocorp-workitems
INSTALL
IMPORT
SIG · ROBOCORP-WORKITEMS
R
robocorp-workitems
workflowpythonv1.5.0
Install
3.2s avg
Import
Disk
26MB
Pass rate
9/ 10
Env Coverage9 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 3.13s
py 3.11
✓ —
✓ 3.28s
py 3.12
✓ —
✓ 2.85s
py 3.13
✓ —
✓ 2.83s
py 3.9
✕ build_error
✓ 3.68s
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

current
from robocorp.workitems import current
from robocorp.workitems import current

This quickstart demonstrates how to read data from an input work item and create an output work item with a new payload. It's designed to run within the Robocorp environment or locally with simulated work item data.

from robocorp.tasks import task from robocorp.workitems import inputs, outputs @task def process_data(): # Read current input work item's payload input_item = inputs.current if input_item.get_payload('my_key'): data = input_item.get_payload('my_key') print(f"Received data: {data}") else: print("No 'my_key' found in input payload. Using default.") data = {"message": "Hello from robot!"} # Create an output work item output_item = outputs.create() # Add a payload to the output work item output_item.set_payload({"status": "processed", "original_data": data}) # You can also add files # output_item.add_file('path/to/my_file.txt') # Save the output work item output_item.save() print("Output work item created and saved.")
Debug
Known issues
breakingThe `robocorp-workitems` library is the modern replacement for the older `RPA.Robocorp.WorkItems` from the `rpaframework`. Direct migration is needed as the API has changed significantly.
fix
Replace `from RPA.Robocorp.WorkItems import WorkItems` with `from robocorp.workitems import current, inputs, outputs`. Re-implement logic using the new, idiomatic API.
affects: All `robocorp-workitems` versions when migrating from `rpaframework`.
gotchaThe `robocorp.workitems.current` object (and `inputs.current`, `outputs.create()`) relies on a Robocorp execution environment. When running a Python script directly without `rc task run` or a properly configured `devdata` folder, `current` might be `None` or operations might fail.
fix
Always run your robot using `rc task run` for local development or within Robocorp Control Room for production. For local testing, simulate input work items by creating a `devdata/work-items-in` directory with `work-item.json` files.
affects: All versions.
gotchaPayloads for work items must be JSON serializable. Attempting to add non-serializable objects (e.g., custom class instances, datetime objects without conversion) directly to the payload will result in a serialization error.
fix
Ensure all data placed into `set_payload` or `add_payload` consists of standard Python types (dict, list, string, number, boolean, None) that can be directly converted to JSON.
affects: All versions.
Upgrade
Version history
1.5.0latest on PyPI · released Mar 13, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
40
OpenAI (training)
1
Resources
robocorp-workitems — pip install robocorp-workitems · libregistry