Overview
This node integrates with the kDrive cloud storage service, allowing users to manipulate files and folders remotely. Specifically, for the File - Download operation, it downloads a file from a specified drive in kDrive and outputs the file data in binary form.
Common scenarios where this node is beneficial include:
- Automating retrieval of files stored in kDrive for further processing or backup.
- Integrating kDrive file downloads into workflows that require file content, such as document processing, data extraction, or sending files via email.
- Building automated pipelines that fetch files on-demand based on triggers or schedules.
Example: Automatically download a report file named "sales-report.pdf" from a specific drive and use its content in subsequent workflow steps.
Properties
| Name | Meaning |
|---|---|
| Drive ID | The unique identifier of the drive where the file is located. |
| File ID | The unique identifier of the file to download within the specified drive. |
| File Name | The name of the file to be downloaded; used to set the output file's name and MIME type. |
Output
The node outputs an array of items, each containing:
jsonfield:- Contains at least the
fileIdof the downloaded file.
- Contains at least the
binaryfield:- Contains a property named
data(default binary property) which holds the downloaded file content encoded in base64. - Includes metadata about the file such as:
mimeType: The MIME type inferred from the file name extension (fallback toapplication/octet-streamif unknown).fileName: The original file name as provided in the input.
- Contains a property named
This structure allows downstream nodes to access the raw file data for further processing or saving.
Dependencies
- Requires an API authentication token credential for kDrive to authorize requests.
- Uses the kDrive REST API endpoints under the base URL
https://api.infomaniak.com/2. - Relies on the
mime-typespackage to determine the MIME type from the file name extension. - n8n environment must have internet access to reach the kDrive API.
Troubleshooting
Common issues:
- Invalid or expired API token will cause authorization failures.
- Incorrect Drive ID or File ID will result in "not found" errors.
- Network connectivity problems can cause request timeouts or failures.
Error messages:
- Errors thrown by the node include HTTP response details when available.
- If the download fails, the error message will indicate the failure reason, including URL and parameters used.
Resolutions:
- Verify the API token is valid and has necessary permissions.
- Double-check Drive ID and File ID values.
- Ensure the file name matches the actual file to correctly infer MIME type.
- Check network connectivity and firewall settings.