Create Documents

erpnext.create_documents
ActionCRM & salesconnection required

Calls the ERPNext API with the connection's credentials.

Insert up to 200 documents in one request. The whole batch is one transaction, so a single failure writes nothing.

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, 1 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
documents
The documents to insert, e.g. [{"customer_name": "Acme Ltd"}, {"customer_name": "Globex"}]. At most 200; each may name its own doctype to override the one above.
arrayYes—≥ 1 characters; array of object[{"customer_name":"Acme Ltd"},{"customer_name":"Globex"}]

Example configuration

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

{
  "doctype": "Customer",
  "documents": [
    {
      "customer_name": "Acme Ltd"
    },
    {
      "customer_name": "Globex"
    }
  ]
}

Output

One shape.

result

FieldTypeExample
doctype
The default DocType the batch was inserted as.
string—
names
The names ERPNext assigned, in the order sent.
array—
count
How many documents were created.
number—
requested
How many documents were sent.
number—
{
  "count": 0,
  "doctype": "",
  "names": [],
  "requested": 0
}

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