Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to perform various file and user-related operations. Specifically, for the resource 获取文件信息 ("Get File Information") and operation 递归获取文件列表 ("Recursively Get File List"), it retrieves a list of files from a specified directory path on Baidu Netdisk. It supports recursive listing, allowing users to fetch files not only in the given directory but also in all its subdirectories.
Common scenarios where this node is beneficial include:
- Automating backup or synchronization tasks by listing all files in a cloud directory.
- Generating reports or inventories of files stored in Baidu Netdisk.
- Feeding file metadata into downstream workflows for processing or analysis.
Example: A user wants to get all files under /Documents
including all nested folders, limiting results to 100 entries, sorted ascending by default.
Properties
Name | Meaning |
---|---|
目录 (path) | The directory path in Baidu Netdisk from which to start listing files. Default is root / . |
是否递归 (recursion) | Boolean flag indicating whether to recursively list files in all subdirectories (true ) or just the specified directory (false ). |
查询数目 (limit) | Maximum number of file entries to return. Must be at least 1. |
文件排序 (desc) | Boolean flag to determine sorting order of files. true means descending order; false ascending. |
Note: Some properties are shown conditionally depending on the selected operation and resource.
Output
The output is an array of JSON objects representing files retrieved from Baidu Netdisk. Each object contains metadata about a file or folder, such as name, path, size, modification date, and type. The exact fields depend on the Baidu API response and the formatting function used internally.
If binary data is involved (not in this specific operation), it would represent actual file contents, but for this operation, only metadata is returned.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses internal helper functions to make authenticated HTTP GET requests to Baidu's endpoints.
- Relies on n8n's node parameter system to obtain input values.
- No external environment variables beyond the configured API credentials are needed.
Troubleshooting
- Empty or incomplete file lists: Ensure the directory path exists and the API credentials have sufficient permissions.
- API errors: The node checks for error codes in API responses and throws descriptive errors. Common issues include invalid tokens, rate limits, or malformed parameters.
- Invalid JSON or unexpected response format: This can occur if Baidu changes their API or network issues cause corrupted responses.
- Limit parameter too low or missing: The limit must be at least 1; otherwise, the node may throw an error or return no results.
To resolve errors:
- Verify API credentials are valid and have required scopes.
- Double-check input parameters, especially the directory path and recursion flag.
- Consult Baidu Netdisk API documentation for any recent changes.
- Review node execution logs for detailed error messages.
Links and References
- Baidu Netdisk API Documentation (in Chinese)
- Baidu Netdisk official site: https://pan.baidu.com/