Aliyun OSS icon

Aliyun OSS

Sends data to Aliyun OSS

File → Download

AI-generated

Overview

The Aliyun OSS node for n8n allows you to interact with Alibaba Cloud's Object Storage Service (OSS). Specifically, the File → Download operation enables you to download a file from a specified OSS bucket and make it available as binary data within your workflow. This is useful for automating processes that require fetching files from cloud storage, such as processing images, documents, or backups stored in Aliyun OSS.

Practical examples:

  • Downloading log files for analysis.
  • Fetching images for further processing or delivery.
  • Retrieving backup archives for automated restoration.

Properties

Name Meaning
Bucket Name The name of the OSS bucket from which to download the file.
File Key The key (path/filename) of the file to download within the specified bucket.
Binary Property Name of the binary property to which the downloaded file's data will be written (default: data).

Output

  • Binary Data:
    The node outputs an item with a binary field containing the downloaded file. The property name inside binary matches the value set in "Binary Property".

    • The binary object includes:
      • The file content (as a buffer)
      • The original filename
      • The MIME type (if available)
  • JSON Field:
    The original JSON data from the input item is preserved in the output.

Example output structure:

{
  "json": { /* original input json */ },
  "binary": {
    "data": {
      "data": "<base64-encoded file content>",
      "fileName": "example.txt",
      "mimeType": "text/plain"
    }
  }
}

(If you set "Binary Property" to something else, e.g., "myFile", the key would be "myFile" instead of "data")

Dependencies

  • External Service: Requires access to Alibaba Cloud OSS.
  • Credentials: You must configure Aliyun credentials (accessKeyId, accessKeySecret, and region) in n8n.
  • n8n Configuration: No additional environment variables are required beyond standard credential setup.

Troubleshooting

Common Issues:

  • Invalid Bucket Name or File Key: If the bucket or file does not exist, the node will throw an error.
  • Directory Download Attempt: If you provide a file key ending with / (indicating a directory), the node will throw an error:
    "Downloading a whole directory is not yet supported, please provide a file key"
  • Permission Errors: Ensure your Aliyun credentials have permission to read from the specified bucket.

Error Messages and Resolutions:

  • "Downloading a whole directory is not yet supported, please provide a file key"
    Resolution: Double-check the "File Key" property and ensure it points to a specific file, not a folder.
  • Authentication errors:
    Resolution: Verify your Aliyun credentials in n8n are correct and have sufficient permissions.

Links and References

Discussion