Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Wangpan) APIs to perform various operations related to user info, file information, file management, and sharing services. Specifically, for the "分享服务" (Sharing Service) resource and the "百度分享保存" (Baidu Share Save) operation, it allows users to save files shared via Baidu Netdisk share links into a specified directory in their own Baidu Netdisk account.
Common scenarios where this node is beneficial include:
- Automatically saving files shared by others on Baidu Netdisk to your own cloud storage.
- Automating workflows that involve collecting shared resources without manual download and upload.
- Managing shared content programmatically within larger automation pipelines.
Practical example:
- A user receives a Baidu Netdisk share URL with an optional password and wants to save the shared files directly into a specific folder in their Baidu Netdisk. This node takes the share URL, verifies access using the password if needed, and saves the files into the target directory.
Properties
| Name | Meaning |
|---|---|
| 文件地址 | The URL of the Baidu Netdisk shared file or folder to be saved. |
| 分享密码 | The password required to access the shared content, if the share link is password-protected. |
| 保存目录 | The target directory path in the user's Baidu Netdisk where the shared files will be saved. |
Output
The node outputs JSON data representing the result of the save operation:
- If no target directory is specified, it returns an array with the name of the shared item.
- If a target directory is specified, it returns a list of saved files with details such as file IDs and paths.
- The output is structured as an array of objects, each corresponding to an item processed.
- No binary data output is indicated in the code.
Example output snippet (simplified):
[
{
"name": "example_file_name",
"fs_id": 123456789,
"category": "文件夹"
}
]
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- Uses Baidu Netdisk official APIs for user info, file management, and share verification.
- Relies on internal helper functions for making HTTP requests to Baidu APIs and handling responses.
- Requires proper configuration of the Baidu Netdisk API credentials in n8n.
Troubleshooting
Common issues:
- Invalid or expired share URLs may cause errors.
- Incorrect or missing share passwords will prevent access to protected shares.
- Specifying a non-existent or unauthorized save directory can cause failures.
- Network or API rate limits from Baidu may interrupt operations.
Error messages:
- Errors returned from Baidu API calls are checked and thrown as node operation errors.
- Messages like "JSON合集中不是有效的JSON" indicate invalid JSON input when managing files.
- Password verification failures during share access will throw errors indicating share access denial.
Resolutions:
- Verify the share URL format and ensure it uses HTTPS.
- Confirm the share password is correct if the share is protected.
- Ensure the target save directory exists and the user has write permissions.
- Check network connectivity and API quota limits.
Links and References
- Baidu Netdisk API Documentation (internal link)
- Baidu Netdisk official site: https://pan.baidu.com/