Submit Document

erpnext.submit_document
ActionCRM & salesconnection required

Calls the ERPNext API with the connection's credentials.

Submit a submittable document, moving it from draft to submitted and posting its ledger entries.

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

3 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
name
The draft document to submit. It is read first and submitted unchanged unless you supply a document below.
stringNo——ACC-SINV-2025-00001
document
The whole document to submit, when you want to change fields in the same call. Supply this or a name.
objectNo———
  • At least one of name, document must be set.

Example configuration

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

{
  "doctype": "Customer",
  "name": "ACC-SINV-2025-00001"
}

Output

One shape.

result

FieldTypeExample
doctype
The DocType that was acted on.
string—
name
The document's name in ERPNext.
string—
docstatus
0 for draft, 1 for submitted, 2 for cancelled.
number—
document
The whole document as ERPNext stored it.
object—
{
  "docstatus": 0,
  "doctype": "",
  "document": {},
  "name": ""
}

See Submit Document 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.