Overview
This node integrates with the Chinese version of the ERPNext API, allowing users to query document types and retrieve specific documents from an ERP system. It is particularly useful for automating workflows that require fetching business documents such as customer records, sales orders, or inventory items based on dynamic search criteria.
A common scenario would be retrieving a document by its type and name/ID to use its data in subsequent workflow steps, such as generating reports, updating records, or triggering notifications.
For example, you can input a keyword to search for relevant document types (like "Customer" or "Sales"), select the desired document type from the filtered list, and then specify the exact document name or ID to fetch detailed information about that document.
Properties
| Name | Meaning |
|---|---|
| DocType 搜索关键字 | Input keyword to search DocTypes with fuzzy matching; helps filter document types by keyword. Example: "Customer", "Sales", "Item". |
| 文档类型 Name or ID | Select the document type from a dynamically loaded list based on the search keyword. Required field. |
| 文档名称 | The name or ID of the document to retrieve within the selected document type. Required field. |
Output
The node outputs JSON data representing the retrieved document's details from the ERP system. This includes all fields and values associated with the specified document type and document name/ID.
If the document contains any binary data (e.g., attached files), the node would handle it accordingly, but this particular operation focuses on JSON document retrieval.
Dependencies
- Requires an API key credential for authenticating with the ERPNext Chinese API.
- Depends on the ERPNext backend service being accessible and properly configured.
- Uses internal services to load document types and related metadata dynamically.
Troubleshooting
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Specifying a non-existent document type or document name/ID will result in errors or empty results.
- Network connectivity problems may prevent access to the ERPNext API.
Error messages:
"Resource ... not found or not implemented"indicates the selected resource is invalid or unsupported.- Errors related to loading options usually mean the API endpoint for fetching document types or filters is unreachable or misconfigured.
Resolutions:
- Verify API credentials and permissions.
- Confirm the document type and document name/ID exist in the ERP system.
- Check network settings and ERPNext API availability.
Links and References
- ERPNext Official Documentation
- n8n Expressions Documentation (for using expressions in property fields)