Overview
This node integrates with the Chinese version of the ERPNext API, allowing users to manage document types and documents within ERPNext. Specifically, the "删除" (Delete) operation under the "Doctype更删改" resource enables users to delete a specified document type or document by its name or ID. This is useful for maintaining clean data by removing obsolete or incorrect document types or documents from the ERP system.
Practical examples include:
- Deleting a deprecated document type that is no longer used in the business workflow.
- Removing a specific document entry identified by its name or ID to correct errors or outdated information.
Properties
| Name | Meaning |
|---|---|
| 文档类型 Name or ID | The document type to delete. Choose from a searchable list of document types or specify an ID via expression. |
| 文档名称 | The name (or ID) of the document to delete. |
Output
The node outputs JSON data representing the result of the delete operation. Typically, this will confirm whether the deletion was successful or provide details about the deleted document. There is no indication that binary data is output by this node.
Dependencies
- Requires connection to an ERPNext instance configured with appropriate API credentials (an API key or token).
- The node depends on internal services (
DocTypeService) to fetch document types and perform delete operations. - Proper configuration of the ERPNext API credential in n8n is necessary for authentication.
Troubleshooting
Common issues:
- Specifying a non-existent document type or document name/ID may cause the operation to fail.
- Insufficient permissions in ERPNext API credentials can prevent deletion.
- Network or connectivity issues with the ERPNext server.
Error messages:
"Resource ... not found or not implemented": Indicates the selected resource is invalid or not supported; ensure "Doctype更删改" resource is selected.- Errors related to missing or invalid document type or document name parameters: Verify these inputs are correctly set and exist in ERPNext.
- Authentication errors: Check that the API credentials are valid and have delete permissions.
Links and References
- ERPNext Official Documentation
- n8n Expressions Documentation (for specifying IDs dynamically)