Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Wangpan) API to manage files stored on the cloud service. Specifically, for the "管理文件" (Manage Files) resource and the "删除文件" (Delete File) operation, it allows users to delete one or multiple files from their Baidu Netdisk storage by specifying file paths.
Common scenarios where this node is useful include:
- Automating cleanup of unwanted or outdated files in Baidu Netdisk.
- Batch deleting files based on dynamic input data.
- Integrating Baidu Netdisk file management into larger workflows that require file removal as a step.
Example: A user can provide a collection of file paths to be deleted in one execution, enabling efficient bulk deletion without manual intervention.
Properties
Name | Meaning |
---|---|
操作合集 | A collection of files to operate on. It supports two ways to specify files: |
- JSON 合集: A JSON array representing files to delete. | |
- 文件合集: A fixed collection allowing multiple entries, each with a "文件路径" (file path). |
The property "操作合集" is required and must contain either a valid JSON array or a list of file metadata objects specifying the paths of files to delete.
Output
The output is a JSON array where each item corresponds to the result of the delete operation for each input item. The structure typically includes:
path
: The path of the file that was deleted.fs_id
: The unique file system ID assigned by Baidu Netdisk.category
: Always set to "文件夹" (folder) or similar, indicating the type of the deleted item.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses Baidu Netdisk REST API endpoints for file management.
- The node expects proper configuration of the Baidu Netdisk API credentials within n8n.
- Network connectivity to Baidu's API endpoints is necessary.
Troubleshooting
- Invalid or missing file list: If the "操作合集" property is empty or not properly formatted, the node throws an error asking to select an operation collection.
- Invalid JSON format: When using the JSON collection option, if the JSON is malformed or invalid, an error will be thrown indicating the JSON collection is not valid.
- API errors: The node checks for error codes returned by Baidu API and surfaces them. Common issues might include authentication failures, permission denied, or file not found errors.
- File path encoding: File paths are URL-encoded before sending to the API; ensure paths are correctly specified.
- Rate limits or network issues: As with any API integration, transient network problems or rate limiting by Baidu may cause failures.
To resolve errors:
- Verify the correctness and completeness of the file paths.
- Ensure the API credentials are valid and have sufficient permissions.
- Validate JSON input when using the JSON collection.
- Check network connectivity and retry if needed.
Links and References
- Baidu Netdisk API Documentation (in Chinese)
- Baidu Netdisk official site: https://pan.baidu.com/
Note: This summary is based solely on static analysis of the provided source code and property definitions. Runtime behavior may depend on actual API responses and environment setup.