BaiduWp icon

BaiduWp

调用百度网盘接口

Overview

This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to retrieve categorized file lists from a user's cloud storage. Specifically, the "获取文件信息" resource with the "获取分类文件列表" operation allows users to query files by category (e.g., videos, audio, images, documents) within a specified directory path. It supports options such as recursive search, limiting the number of results, and sorting order.

Common scenarios where this node is beneficial include:

  • Automating file management workflows by fetching specific types of files from Baidu Netdisk.
  • Integrating Baidu Netdisk content into other systems or processes based on file categories.
  • Building dashboards or reports that summarize user files by type and location.

Practical example:

  • A user wants to list all video files under the "/Movies" directory recursively, limiting the output to 100 items sorted ascendingly. This node can perform that query and return structured file metadata for further processing.

Properties

Name Meaning
文件类型 File category/type to filter by. Options: 视频 (Video), 音频 (Audio), 图片 (Image), 文档 (Document), 应用 (Application), 其他 (Other), 种子 (Torrent)
目录名称 Directory path name to search within. Default is root "/"
是否递归 Whether to search recursively in subdirectories. Boolean true/false
查询数目 Maximum number of results to return. Must be at least 1
文件排序 Sort order of the results. Boolean false means ascending, true means descending

Output

The node outputs an array of JSON objects representing files matching the query criteria. Each object contains metadata about a file, such as its name, path, size, modification date, and category. The exact fields depend on the Baidu Netdisk API response but are normalized/formatted by the node before output.

No binary data output is indicated for this operation.

Dependencies

  • Requires a valid Baidu Netdisk API key credential configured in n8n.
  • Uses Baidu Netdisk REST API endpoints to fetch file information.
  • Network connectivity to Baidu Netdisk services is necessary.
  • No additional external dependencies beyond the Baidu API and n8n environment.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Incorrect directory paths may result in empty results or errors.
    • Requesting too many results or using recursion on very large directories might lead to timeouts or rate limiting.
  • Error messages:

    • Errors returned from Baidu API are surfaced; typical messages include permission denied, invalid parameters, or quota exceeded.
    • If the node throws an error related to parameter validation, verify that required properties like "查询数目" (limit) are set correctly.
  • Resolutions:

    • Ensure API credentials are up-to-date and have sufficient permissions.
    • Double-check directory paths and file category values.
    • Reduce the limit or disable recursion if performance issues occur.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion