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 or files within a specified source directory on their Baidu Netdisk storage.
Common scenarios include:
- Automating file organization by programmatically creating folders.
- Preparing directory structures before uploading files.
- Integrating Baidu Netdisk folder creation into larger workflows involving cloud storage management.
Example: A user wants to create a new folder named "ProjectDocs" inside an existing directory "/Work". This node can be configured to specify the source directory as "/Work" and filename as "ProjectDocs", which will create the folder accordingly.
Properties
Name | Meaning |
---|---|
源目录 (path) | The source directory path where the new file or folder will be created. Example: /Work |
文件名称 (filename) | The name of the file or folder to create inside the source directory. Example: ProjectDocs |
These properties are required inputs when using the "管理文件" resource with the "创建文件" operation.
Output
The output is a JSON array where each item corresponds to the result of the create file/folder operation for each input item.
The JSON object includes:
path
: The full path of the newly created file or folder.fs_id
: A unique identifier for the file or folder in Baidu Netdisk.category
: The type category, e.g., "文件夹" (folder).
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Baidu Netdisk API authentication.
- The node uses internal Baidu API endpoints to perform file operations.
- Network access to Baidu Netdisk API services is necessary.
- No additional external dependencies beyond the bundled code and n8n environment.
Troubleshooting
Common issues:
- Invalid or empty
源目录
or文件名称
parameters may cause the API request to fail. - Insufficient permissions or invalid API credentials will prevent folder creation.
- Network connectivity issues can cause timeouts or failed requests.
- Invalid or empty
Error messages:
- Errors returned from Baidu API are checked and surfaced; typical errors might indicate "file already exists," "invalid path," or "authentication failed."
- If the node throws an error about selecting an operation collection or invalid JSON, ensure that the input parameters are correctly set and valid.
Resolution tips:
- Verify that the source directory exists and the path is correctly formatted.
- Confirm that the API key credential is valid and has sufficient permissions.
- Check network connectivity and retry if transient errors occur.
Links and References
- Baidu Netdisk API Documentation (in Chinese)
- Baidu Netdisk official site: https://pan.baidu.com/