Actions15
Overview
This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to manage files and user information. Specifically, for the "管理文件" (Manage Files) resource and the "创建文件" (Create File) operation, it allows users to create new directories (folders) within their Baidu Netdisk storage.
Common scenarios where this node is beneficial include:
- Automating folder creation in Baidu Netdisk as part of a workflow.
- Organizing files by dynamically creating directories before uploading or moving files.
- Integrating Baidu Netdisk folder management into larger automation pipelines.
Example: Automatically create a project folder named "ProjectX" inside a specified path on Baidu Netdisk whenever a new project is initiated in another system.
Properties
Name | Meaning |
---|---|
源目录 (path) | The source directory path under which the new folder will be created. Example: /documents/projects |
文件名称 (filename) | The name of the new folder to create inside the source directory. Example: ProjectX |
Output
The output JSON contains details about the newly created folder:
path
: The full path of the created folder on Baidu Netdisk.fs_id
: A unique identifier for the folder in Baidu Netdisk.category
: Always set to"文件夹"
(folder), indicating the type of the created item.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Baidu Netdisk API access.
- The node uses internal helper functions to make HTTP requests to Baidu's REST API endpoints.
- The request to create a folder is a POST request to
/rest/2.0/xpan/file
with method"create"
and form-urlencoded parameters. - Proper configuration of the Baidu Netdisk API credentials in n8n is necessary.
Troubleshooting
Error: Missing or invalid path or filename
Ensure that both "源目录" (path) and "文件名称" (filename) are provided and valid strings. Empty or malformed paths may cause API errors.API Request Failures
If the node returns errors related to authentication or permissions, verify that the API key credential is correctly configured and has sufficient permissions to create folders.Folder Already Exists
If a folder with the same name already exists at the target path, the API might return an error or fail silently depending on Baidu's response. Consider adding logic to check for existing folders before creation.Network Issues
Network connectivity problems can cause request failures. Check your network connection and proxy settings if applicable.
Links and References
- Baidu Netdisk API Documentation (Chinese) (as referenced in the node metadata)
- Baidu Netdisk official site: https://pan.baidu.com/
This summary focuses solely on the "管理文件" resource and the "创建文件" operation as requested.