Count Documents

erpnext.count_documents
ActionCRM & salesconnection required

Calls the ERPNext API with the connection's credentials.

Count how many documents of a DocType match the filters, fetching none.

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

2 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
filters
Frappe filters as a list of triples, e.g. [["status", "=", "Open"], ["grand_total", ">", 1000]]. Combined with AND.
arrayNo———

Example configuration

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

{
  "doctype": "Customer"
}

Output

One shape.

result

FieldTypeExample
doctype
The DocType that was counted.
string—
count
How many documents matched.
number—
{
  "count": 0,
  "doctype": ""
}

See Count 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.