Overview
This node integrates with the ERPNext China API, providing various operations on different resources within the ERPNext system. Specifically, for the "文件处理" (File Handling) resource and the "删除文件" (Delete File) operation, it allows users to delete a file from the ERPNext system by selecting or specifying the file's name or ID.
Common scenarios where this node is beneficial include:
- Automating cleanup of obsolete or temporary files stored in ERPNext.
- Managing storage by programmatically removing files no longer needed.
- Integrating file deletion into broader workflows that handle document lifecycle management.
For example, after processing an invoice PDF, a workflow could automatically delete the original file to save space.
Properties
| Name | Meaning |
|---|---|
| File Name or ID | Select a file from a dynamically loaded list of files or specify a file ID using an expression. This identifies the file to be deleted. |
Output
The node outputs JSON data representing the result of the delete operation. Typically, this will confirm whether the file was successfully deleted or provide error details if the operation failed.
If the node supports binary data output, it is not indicated here; thus, the output primarily consists of JSON confirming the deletion status.
Dependencies
- Requires connection to an ERPNext China API instance.
- Needs an API authentication token or key configured as credentials within n8n to authorize requests.
- The node depends on internal services to fetch file lists dynamically for property options.
Troubleshooting
Common Issues:
- Selecting a file that does not exist or has already been deleted may cause errors.
- Insufficient permissions or invalid API credentials can lead to authorization failures.
- Network connectivity issues with the ERPNext API endpoint can prevent execution.
Error Messages:
"Resource 文件处理 not found or not implemented": Indicates the specified resource is missing or not supported; verify the resource name.- Errors related to file not found or access denied typically mean the file identifier is incorrect or credentials lack necessary permissions.
Resolutions:
- Ensure the file exists and is correctly selected or referenced.
- Verify API credentials are valid and have appropriate permissions.
- Check network connectivity and ERPNext API availability.
Links and References
- ERPNext Official Documentation
- n8n Expressions Documentation (for using expressions in property fields)