Overview
This node retrieves a list of files from the AIGC Network Disk service. It supports searching files by keywords, filtering by file categories, sorting results by various fields, and paginating through large result sets. This node is useful for workflows that need to access or manage files stored in the AIGC Network Disk, such as automating file retrieval, cataloging, or processing files based on metadata.
Practical examples include:
- Searching for documents containing specific keywords in their names or descriptions.
- Filtering files by type (e.g., images, videos) and sorting them by upload time or popularity.
- Paginating through large collections of files to process or display them incrementally.
Properties
| Name | Meaning |
|---|---|
| 搜索关键词 (query) | Search keyword to look for in file names and descriptions. Supports Chinese characters. |
| 文件分类 (categoryId) | Filter files by category. Options: 其他 (Other), 全部 (All), 视频 (Video), 图片 (Image), 文档 (Document), 压缩包 (Archive), 音频 (Audio) |
| 排序字段 (sortBy) | Field to sort the results by. Options: 上传时间 (upload_time), 文件大小 (file_size), 访问次数 (access_count), 下载次数 (download_count) |
| 排序方向 (sortOrder) | Sort direction. Options: 降序 (desc), 升序 (asc) |
| 页码 (page) | Page number to retrieve, starting from 1 |
| 每页数量 (size) | Number of files per page to return, maximum 100 |
Output
The node outputs an array of JSON objects representing files matching the query and filters. Each file object includes:
- Original file properties plus additional computed fields:
downloadUrl: URL to download or preview the file.isExpired: Boolean indicating if the file link has expired.categoryName: Human-readable name of the file category.uploadDate: Upload timestamp formatted as a localized string.fileSizeFormatted: File size formatted into human-readable units (B, KB, MB, GB).
Additionally, the output contains pagination info:
total: Total number of matching files.page: Current page number.size: Number of files per page.totalPages: Total pages available.hasNext: Whether there is a next page.hasPrev: Whether there is a previous page.
Filters used and operation metadata are also included.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the AIGC Network Disk API.
- The node makes authenticated HTTP GET requests to the
/api/filesendpoint of the service. - No other external dependencies are required.
Troubleshooting
Common issues and error messages:
- API Token Invalid or Expired: If the API token is invalid or expired, the node throws an error indicating authentication failure. Solution: update or refresh the API key credential.
- No Permission to Access File List: If the user lacks permission, a 403 error is returned. Solution: ensure the API key has sufficient permissions.
- Bad Request Parameters: If request parameters like page number or sorting options are invalid, a 400 error occurs. Solution: verify input parameters for correctness.
- Server Internal Error: Server-side errors (status code 500+) indicate temporary issues. Solution: retry after some time.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details in the output.
Links and References
- AIGC Network Disk API Documentation (Not provided in source; replace with actual URL if available)
- n8n HTTP Request Node documentation: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/