Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to perform various file and user management operations. Specifically, for the "管理文件" (Manage Files) resource and the "移动文件" (Move File) operation, it allows users to move files or folders within their Baidu Netdisk storage.
Typical use cases include:
- Organizing files by moving them into different directories.
- Renaming files while moving them.
- Batch processing multiple files or folders in one operation.
For example, a user can provide a collection of files with their current paths and target destination directories, optionally renaming them during the move process.
Properties
Name | Meaning |
---|---|
操作合集 | A collection of files to operate on. It supports two input modes: |
- JSON 合集: A JSON array describing files to move. | |
- 文件合集: A fixed collection allowing multiple entries, each specifying: | |
- 文件路径 (path): The current path of the file or folder to move. | |
- 移动目录 (dest): The destination directory where the file/folder should be moved. | |
- 重命名 (newname): Optional new name for the file/folder after moving. |
Output
The output is an array of JSON objects representing the result of the move operation for each file or folder processed. Each object typically contains metadata such as:
path
: The new path of the moved file or folder.fs_id
: The unique file system identifier assigned by Baidu Netdisk.category
: Usually indicates the type, e.g., "文件夹" (folder).
The output is structured so that each input item corresponds to one output item, preserving execution metadata for traceability.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses Baidu Netdisk REST API endpoints for file management.
- The node depends on internal helper functions for API requests, error handling, and JSON validation.
- Requires proper configuration of the Baidu Netdisk API credentials in n8n.
Troubleshooting
- Invalid JSON Collection: If the JSON input for the file list is malformed or invalid, the node throws an error indicating the JSON collection is not valid. Ensure the JSON syntax is correct.
- Missing Operation Collection: If the operation collection (
filelist
) is empty or missing required fields likepath
ordest
, the node will throw an error asking to select the operation collection. - API Errors: The node checks for error codes returned from Baidu API calls. Common errors might relate to authentication failure, insufficient permissions, or invalid paths. Verify API credentials and ensure the source and destination paths exist and are accessible.
- Rename Conflicts: If a rename causes a conflict (e.g., a file with the new name already exists in the destination), the API may return an error. Handle such conflicts by choosing unique names or adjusting the
ondup
behavior if supported.
Links and References
- Baidu Netdisk API Documentation
- Node documentation URL (as per code): https://kkii7i0416.feishu.cn/wiki/DZ9DwGaZqivbh6kCNfIcfwYsnye
This summary focuses on the "管理文件" resource and the "移动文件" operation as requested, based on static analysis of the provided source code and property definitions.