BaiduWp icon

BaiduWp

调用百度网盘接口

Overview

This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to perform various operations related to user information, file management, and shared files. Specifically, for the Resource "获取文件信息" (Get File Information) and Operation "获取Bt列表" (Get BT List), it retrieves a list of BitTorrent (BT) files from a specified directory in the user's Baidu Netdisk storage.

Common scenarios where this node is beneficial include:

  • Automating retrieval of torrent file lists stored in Baidu Netdisk.
  • Managing and organizing BT files programmatically.
  • Integrating Baidu Netdisk file data into workflows for further processing or reporting.

Practical example:

  • A user wants to fetch all BT files under a specific folder (e.g., "/downloads/torrents") to process them in another system or trigger notifications when new torrents appear.

Properties

Name Meaning
目录名称 The directory path in Baidu Netdisk to query. Default is root directory "/".
查询数目 Number of items to retrieve. Range: 0 to 1000. Default is 100.
是否递归 Whether to recursively search subdirectories within the specified directory. Boolean value.
文件排序 Whether to sort files in descending order. Boolean value.

Output

The output is an array of JSON objects representing the BT files retrieved from the specified directory. Each object contains metadata about a BT file such as its name, size, creation 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 data describing the files.

Dependencies

  • Requires an API key credential for Baidu Netdisk API authentication.
  • Uses internal Baidu API endpoints to fetch file lists and user information.
  • Relies on n8n's HTTP request capabilities and helper methods for constructing execution metadata.
  • No additional external services beyond Baidu Netdisk are required.

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 more than the maximum allowed number of items (1000) will be rejected.
    • Recursive queries on very large directories may lead to timeouts or performance issues.
  • Error messages:

    • Errors returned from Baidu API calls are checked and thrown as node operation errors with descriptive messages.
    • If the response contains error codes, the node surfaces these to help diagnose issues like permission denied or invalid parameters.
  • Resolutions:

    • Ensure valid and active API credentials are configured.
    • Verify the directory path exists and is accessible.
    • Limit the number of items requested to reasonable values.
    • Avoid deep recursion on large directory trees or paginate requests if needed.

Links and References

Discussion