Overview
This node downloads a file from the AIGC Network Disk service into an n8n workflow. It supports handling multiple file types and stores the downloaded content as binary data within the workflow. This is useful when you want to automate workflows that involve retrieving files stored remotely on the AIGC Network Disk, such as processing documents, images, or other media files after download.
Practical examples:
- Automatically downloading user-uploaded files for further processing or analysis.
- Fetching reports or exported data files from the cloud storage to integrate with other systems.
- Archiving or backing up files by downloading them and then uploading to another service.
Properties
| Name | Meaning |
|---|---|
| 文件ID (fileId) | The ID of the file to download. Can be obtained from file lists or upload responses. |
| 输出数据字段名 (binaryPropertyName) | The name of the binary data field where the downloaded file will be saved. Default is "data". |
Output
The node outputs an array of items, each containing:
json: Metadata about the downloaded file:
success: Boolean indicating if the download succeeded.operation: The operation performed, here always"downloadFile".fileId: The ID of the downloaded file.filename: The original or fallback filename of the downloaded file.fileSize: Size of the file in bytes.mimeType: MIME type of the file.downloadUrl: The direct URL used to download the file.message: A success message including the filename.
binary: Contains the actual file data under the key specified by the
binaryPropertyNameinput property. The binary data includes the file content, filename, and MIME type.pairedItem: Index linking output item to the corresponding input item.
Dependencies
- Requires an API key credential for authenticating requests to the AIGC Network Disk API.
- The node uses two HTTP requests:
- To fetch file metadata and download URL from the AIGC Network Disk API.
- To download the actual file content using the retrieved URL.
- No additional environment variables are required beyond the API authentication setup.
Troubleshooting
- Empty or missing File ID: The node throws an error if the file ID is empty or whitespace. Ensure the file ID is correctly provided.
- Download URL not found: If the API response lacks a valid download URL, the node errors out. Verify the file exists and the API returns correct metadata.
- HTTP errors:
- 404: File does not exist or has expired. Check the file ID validity.
- 403: Insufficient permissions to download the file. Confirm API credentials have proper access rights.
- 401: Invalid or expired API token. Refresh or update the API key credential.
- 5xx: Server-side errors; retry later.
- Timeouts: The file download request times out after 60 seconds. For large files or slow networks, consider network stability or splitting downloads.
Links and References
- AIGC Network Disk API Documentation (Replace with actual link if available)
- n8n HTTP Request Node Documentation
- Working with Binary Data in n8n