List Documents

erpnext.list_documents
ActionCRM & salesconnection required

Calls the ERPNext API with the connection's credentials.

Fetch one page of documents of a DocType, with optional field list, filters and sort order.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
ERPNext
Secret shape
{"api_key": "…", "api_secret": "…"}
Config it needs
base_url, doctype
Resolved by
config.connection_id, else node.connection_id

Configuration

8 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
doctype
The DocType to act on, spelled as ERPNext spells it (e.g. 'Sales Order'). Overrides the default DocType on the connection.
stringNo——Customer
fields
Which fields to return, e.g. ["name", "customer_name", "status"]. Leave empty for the name only, which is what ERPNext returns by default.
arrayNo—array of string—
filters
Frappe filters as a list of triples, e.g. [["status", "=", "Open"], ["grand_total", ">", 1000]]. Combined with AND.
arrayNo———
or_filters
Extra filters in the same triple form, joined with OR and applied on top of the AND filters above.
arrayNo———
order_by
Sort clause in Frappe's form: a field name followed by asc or desc.
stringNo——modified desc
limit
How many documents to return. 0 asks ERPNext for every match, which on a large DocType can be slow. ERPNext defaults to 20 when this is empty.
numberNo200–100000—
offset
How many matching documents to skip before the page starts, for paging.
numberNo00–10000000—
parent
The parent DocType, required only when listing rows of a child table.
stringNo———

Example configuration

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

{
  "doctype": "Customer",
  "limit": 20,
  "offset": 0,
  "order_by": "modified desc"
}

Output

One shape.

result

FieldTypeExample
items
The documents on this page, in the requested order.
array—
count
How many documents this page returned.
number—
doctype
The DocType that was listed.
string—
limit
The page size that was asked for.
number—
offset
The offset this page started at.
number—
has_more
True when the page came back full, so another may follow.
boolean—
{
  "count": 0,
  "doctype": "",
  "has_more": false,
  "items": [],
  "limit": 0,
  "offset": 0
}

See List Documents run in a workflow.

In a technical demo we add the ERPNext connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.