List Workers
onfleet.list_workers
ActionBusiness appsconnection required
Calls the Onfleet API with the connection's credentials.
List the organisation's drivers, optionally filtered by team or state.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Onfleet
- Secret shape
- the API key, or {"api_key": "…"}
- Config it needs
- base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
states Only workers in these states, as a comma-separated list: 0 off duty, 1 idle on duty, 2 on duty with an active task. | string | No | — | — | 1,2 |
teams Only workers who belong to one of these team ids, as a comma-separated list. | string | No | — | — | — |
phones Only workers with one of these phone numbers, as a comma-separated list. | string | No | — | — | — |
filter_fields Return only these worker fields, as a comma-separated list such as 'name,location'. Leave blank for the whole record. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"states": "1,2"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
items The records on this page, exactly as Onfleet returned them. | array | — |
count How many records are on this page. | number | — |
items[].id A worker's Onfleet id. | string | — |
items[].name That worker's name. | string | — |
items[].phone That worker's phone number. | string | — |
items[].onDuty Whether that worker is currently on duty. | boolean | — |
items[].activeTask The task that worker is working on. | string | — |
items[].teams The team ids that worker belongs to. | array | — |
items[].location That worker's [longitude, latitude] pair. | array | — |
{
"count": 0,
"items": [
{
"activeTask": "",
"id": "",
"location": [],
"name": "",
"onDuty": false,
"phone": "",
"teams": []
}
]
}Notes
- The API's includePasswordDetails filter is deliberately not offered: it returns a driver's temporary password, which does not belong in a step output.
Related Onfleet nodes
See List Workers run in a workflow.
In a technical demo we add the Onfleet connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.