Overview
This node integrates with the Chinese version of ERPNext API, enabling users to manage various ERP resources programmatically within n8n workflows. Specifically, the "Doctype更删改" resource with the "更新" (Update) operation allows updating existing document types in ERPNext.
Typical use cases include:
- Automating updates to document metadata or fields in ERPNext.
- Synchronizing document changes from other systems into ERPNext.
- Batch updating document properties based on workflow logic.
For example, you might update a sales order document's status or modify custom fields on an invoice document automatically when triggered by external events.
Properties
| Name | Meaning |
|---|---|
| 文档类型 Name or ID | The document type to update. Choose from a searchable list of document types or specify the ID using an expression. |
| 文档名称 | The name or ID of the specific document instance to update. |
| 属性 | A collection of properties to update on the document. Each property includes: |
| - 字段名称或ID Name or ID: The field name or ID to update, selectable from a list dependent on the chosen document type. | |
| - 值: The new value to assign to the specified field. |
Output
The node outputs JSON data representing the result of the update operation. This typically includes confirmation of the updated document and any returned fields from the ERPNext API after the update.
No binary data output is indicated for this operation.
Dependencies
- Requires connection to an ERPNext instance via an API key credential configured in n8n.
- Uses ERPNext Chinese version API endpoints.
- Relies on dynamic loading of document types, fields, and filters through internal service methods to populate options.
Troubleshooting
Common issues:
- Incorrect document type or document name/ID may cause the update to fail.
- Missing or invalid API credentials will prevent successful communication with ERPNext.
- Specifying fields not valid for the selected document type can lead to errors.
Error messages:
"Resource ... not found or not implemented"indicates the requested resource or operation is unavailable; verify resource and operation names.- API errors from ERPNext may indicate permission issues or invalid data formats; check credentials and input values.
Resolution tips:
- Ensure the document type and document name/ID exist in ERPNext.
- Use the provided searchable dropdowns or expressions carefully to select valid IDs.
- Verify API credentials and permissions.
- Validate that all fields being updated are applicable to the document type.
Links and References
- ERPNext Official Documentation
- n8n Expressions Documentation
- ERPNext API Reference (general reference, adapt for Chinese version)