Aliyun OSS icon

Aliyun OSS

Sends data to Aliyun OSS

File → Get Many

AI-generated

Overview

The Aliyun OSS node for n8n allows you to interact with Alibaba Cloud's Object Storage Service (OSS). Specifically, the File → Get Many operation retrieves a list of files from a specified bucket. This is useful for automating workflows that need to process, filter, or analyze files stored in OSS buckets.

Common scenarios:

  • Listing all files in a bucket for further processing.
  • Fetching a limited number of files for batch operations.
  • Filtering files by folder or prefix within a bucket.
  • Retrieving file metadata for reporting or auditing purposes.

Practical examples:

  • Automatically process new files uploaded to a specific folder in an OSS bucket.
  • Generate reports on the contents of a storage bucket.
  • Sync or backup files between OSS and other services.

Properties

Name Meaning
Bucket Name The name of the OSS bucket from which to retrieve files. (Required)
Return All Whether to return all results or only up to a given limit. If set to true, all files are returned; if false, the number of results is limited by the "Limit" property.
Limit Max number of results to return. Only shown if "Return All" is false. Accepts values from 1 to 500.
Options Additional options for filtering and output:
- Fetch Owner: Include the owner field with each file (not present by default).
- Folder Key: Filter files by a specific folder/prefix within the bucket.

Output

The node outputs an array of JSON objects, each representing a file in the specified bucket. Each object typically contains:

  • name: The file's key (path/name) in the bucket.
  • size: The size of the file in bytes.
  • lastModified: Timestamp of the last modification.
  • etag: The entity tag (unique identifier for the file version).
  • type: The type of the object (e.g., 'Normal').
  • storageClass: The storage class of the file.
  • owner (optional): Information about the file's owner, if "Fetch Owner" is enabled.

Example output:

[
  {
    "name": "folder1/fileA.txt",
    "size": 12345,
    "lastModified": "2024-06-01T12:34:56.000Z",
    "etag": "ABCDEF1234567890",
    "type": "Normal",
    "storageClass": "Standard",
    "owner": {
      "id": "1234567890"
    }
  },
  ...
]

Note: The actual fields may vary depending on the OSS API response and selected options.

Dependencies

  • External Service: Requires access to Alibaba Cloud OSS.
  • Credentials: You must configure Aliyun credentials (accessKeyId, accessKeySecret, and region) in n8n.
  • n8n Configuration: The node requires the "aliyun" credential to be set up in your n8n instance.

Troubleshooting

Common issues:

  • Invalid credentials: Ensure your Aliyun credentials are correct and have permission to access the specified bucket.
  • Bucket not found: Double-check the "Bucket Name" property for typos or missing buckets.
  • API limits: If "Limit" exceeds the allowed range (1–500), the node may throw an error.
  • No files returned: If the "Folder Key" does not match any files, the result will be empty.

Error messages:

  • "Downloading a whole directory is not yet supported, please provide a file key": This error occurs if you attempt to download a directory instead of a file. For "Get Many", ensure you're specifying a valid folder key for listing, not downloading.
  • Permission denied: Check your OSS bucket policy and user permissions.

Links and References

Discussion