BaiduWp icon

BaiduWp

调用百度网盘接口

Overview

This node integrates with Baidu Netdisk (Baidu Wangpan) API to retrieve categorized file lists from a user's cloud storage. Specifically, the "获取分类文件列表" (Get Categorized File List) operation fetches files filtered by type (e.g., video, audio, image) within a specified directory path, optionally recursively, and supports sorting and limiting the number of results.

Common scenarios where this node is useful include:

  • Automating file management workflows by listing specific types of files in a cloud directory.
  • Building dashboards or reports that summarize user files by category.
  • Triggering downstream processes based on file categories, such as media transcoding for videos or indexing documents.

Example: Retrieve up to 50 video files under the root directory / without recursion, sorted ascendingly.

Properties

Name Meaning
文件类型 File type/category to list. Options: 视频 (Video), 音频 (Audio), 图片 (Image), 文档 (Document), 应用 (Application), 其他 (Other), 种子 (Torrent). Default is 视频 (Video).
目录名称 Directory path to search within. Default is /.
是否递归 Whether to recursively search subdirectories. Boolean, default false.
查询数目 Maximum number of results to return. Required number, minimum 1, default 50.
文件排序 Sort order of files. Boolean, default false. (Likely indicates ascending/descending order.)

Output

The output is an array of JSON objects representing files matching the query criteria. Each object corresponds to a file or folder with metadata fields standardized by the node's formatting function. The exact fields are not fully detailed here but typically include file name, path, size, modification date, and category.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for Baidu Netdisk API access.
  • Uses internal helper functions to make HTTP GET requests to Baidu's API endpoints.
  • Relies on n8n's standard input/output and error handling mechanisms.

Troubleshooting

  • Empty Results: If no files are returned, verify the directory path and file type filter are correct and that the account has files matching those criteria.
  • API Errors: The node checks for error codes in API responses; common errors may relate to invalid credentials, rate limits, or incorrect parameters.
  • Invalid Parameters: Ensure required properties like "查询数目" (limit) are set and valid (minimum 1).
  • Recursion Performance: Enabling recursion on large directories may cause longer execution times or timeouts.

Links and References

Discussion