Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Wangpan) API to perform various operations related to user info, file information retrieval, file management, and sharing services. Specifically, for the "获取文件信息" (Get File Information) resource and the "搜索文件" (Search File) operation, it allows users to search files within a specified directory on their Baidu Netdisk account by providing a keyword.
Common scenarios where this node is beneficial include:
- Automating file searches in Baidu Netdisk based on keywords.
- Retrieving lists of files matching certain criteria for further processing or reporting.
- Integrating Baidu Netdisk file search into larger workflows that require file metadata.
Practical example:
- A user wants to find all documents containing the word "report" inside their "/work" directory and process them downstream in n8n.
Properties
Name | Meaning |
---|---|
搜索关键字 ("key") | The keyword string used to search for files. This is required. |
查询目录 ("dir") | The directory path in which to perform the search. Defaults to root "/" if not specified. |
查询数目 ("num") | The maximum number of search results to return. Accepts numbers from 0 up to 1000. Default is 100. |
是否递归 ("recursion") | Boolean flag indicating whether to recursively search subdirectories. Default is false. |
Output
The output is an array of JSON objects representing the list of files found matching the search criteria. Each item contains file metadata such as name, path, size, and other relevant attributes formatted by the helper function formatFileMessage
.
- The output is structured as an array under the
json
field. - No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses internal helper functions and API request wrappers to communicate with Baidu's endpoints.
- The node expects proper configuration of the Baidu Netdisk API credentials in n8n.
Troubleshooting
- Empty results: Ensure the search keyword and directory are correctly specified. If recursion is off, files in subdirectories won't be included.
- API errors: The node calls an error handling function after each API request; common errors might relate to invalid credentials, rate limits, or incorrect parameters.
- Invalid directory path: Providing a non-existent directory may result in no results or errors.
- Exceeding max query number: The
num
property must be between 0 and 1000; values outside this range may cause errors.
Links and References
- Baidu Netdisk API Documentation (provided in node description)
- Baidu Netdisk official site: https://pan.baidu.com/