Actions15
Overview
The node "BaiduWp" integrates with Baidu Netdisk APIs to retrieve file information, manage files, and handle sharing services. Specifically, for the resource 获取文件信息 (File Information) and operation 获取文档列表 (Get Document List), it fetches lists of documents stored in a specified directory on Baidu Netdisk.
This node is useful when you want to automate the retrieval of document metadata from Baidu Netdisk, such as listing all Word documents in a folder, optionally recursively, and controlling the number of results and sorting order. Practical examples include:
- Automatically syncing document lists from Baidu Netdisk into another system.
- Generating reports or dashboards based on document metadata.
- Filtering and processing documents programmatically without manual downloads.
Properties
Name | Meaning |
---|---|
目录名称 (parent_path) | The directory path in Baidu Netdisk from which to list documents. Default is root / . |
查询数目 (num) | The maximum number of documents to retrieve. Range: 0 to 1000. Default is 100. |
是否递归 (recursion) | Whether to recursively list documents in subdirectories. true means recursive; false means only current directory. Default is false . |
文件排序 (desc) | Whether to sort the documents in descending order. true for descending; false for ascending. Default is false . |
These properties allow fine control over which documents are listed and how the results are structured.
Output
The output is a JSON array where each item represents a document's metadata retrieved from Baidu Netdisk. Each document object contains fields such as filename, size, modification date, and other relevant attributes formatted by the helper function formatFileMessage
.
The node does not output binary data for this operation; it only returns structured JSON metadata about the documents.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses Baidu Netdisk REST API endpoints to fetch file lists.
- Requires proper configuration of the Baidu Netdisk API credentials within n8n.
- Relies on internal helper functions for API requests, error handling, and response formatting.
Troubleshooting
Common issues:
- Invalid or expired API credentials will cause authentication failures.
- Specifying a non-existent directory path may return empty results or errors.
- Requesting too many items (
num
> 1000) may be rejected by the API. - Recursive listing on very large directories may lead to timeouts or rate limiting.
Error messages:
- Errors returned from Baidu API calls are caught and surfaced by the node. They typically indicate issues like invalid parameters, permission denied, or quota exceeded.
- If the node throws an error about invalid JSON or unexpected response format, verify that the API credentials and parameters are correct.
Resolutions:
- Ensure API credentials are valid and have sufficient permissions.
- Double-check directory paths and parameter values.
- Reduce the number of requested items or disable recursion if performance issues occur.
- Consult Baidu Netdisk API documentation for specific error codes.
Links and References
- Baidu Netdisk API Documentation (in Chinese)
- Baidu Netdisk official site: https://pan.baidu.com/
This summary focuses on the "获取文件信息" resource and "获取文档列表" operation as requested, describing the input properties, output structure, dependencies, and troubleshooting tips based on static analysis of the provided source code.