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.

FieldTypeRequiredDefaultConstraintsExample
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.
stringNo——1,2
teams
Only workers who belong to one of these team ids, as a comma-separated list.
stringNo———
phones
Only workers with one of these phone numbers, as a comma-separated list.
stringNo———
filter_fields
Return only these worker fields, as a comma-separated list such as 'name,location'. Leave blank for the whole record.
stringNo———

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "states": "1,2"
}

Output

One shape.

result

FieldTypeExample
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.

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.