Aliyun OSS icon

Aliyun OSS

Sends data to Aliyun OSS

File → Upload

AI-generated

Overview

The Aliyun OSS node for n8n allows you to upload files to Alibaba Cloud's Object Storage Service (OSS). This is useful for automating file storage, backup, or sharing workflows. Common scenarios include:

  • Uploading generated reports or documents from n8n workflows directly to OSS buckets.
  • Automating the transfer of user-uploaded files to cloud storage.
  • Integrating with other systems that require files to be stored in OSS.

Practical Example:
After processing data in n8n, you can use this node to upload a CSV report to a specific bucket in Aliyun OSS, making it available for download or further processing.


Properties

Name Meaning
Bucket Name The name of the OSS bucket where the file will be uploaded. (Required)
File Name The name to assign to the uploaded file in OSS. If using binary data and not set, the original filename from the binary property will be used. (Required)
Binary Data Whether the data to upload should be taken from a binary field (true) or as plain text content (false).
File Content The text content of the file to upload. Only shown if "Binary Data" is false.
Binary Property Name of the binary property which contains the data for the file to be uploaded. Only shown if "Binary Data" is true. (Default: data)
Additional Fields Collection of advanced options for the upload, including:
- ACL: The canned ACL to apply to the object. Options: Authenticated Read, AWS Exec Read, Bucket Owner Full Control, Bucket Owner Read, Private, Public Read, Public Read Write.
- Grant Full Control: Give the grantee full control permissions on the object.
- Grant Read: Allow grantee to read the object data and its metadata.
- Grant Read ACP: Allow grantee to read the object ACL.
- Grant Write ACP: Allow grantee to write the ACL for the object.
- Lock Legal Hold: Apply a legal hold to this object.
- Lock Mode: The Object Lock mode to apply. Options: Governance, Compliance.
- Lock Retain Until Date: The date/time when the object's lock expires.
- Parent Folder Key: Parent folder in which to create the file.
- Requester Pays: Whether the requester pays for requests and data transfer.
- Server Side Encryption: Server-side encryption algorithm. Options: AES256, AWS:KMS.
- Server Side Encryption Context: AWS KMS Encryption Context for object encryption.
- Server Side Encryption AWS KMS Key ID: KMS key ID for server-side encryption.
- Server Side Encryption Customer Algorithm: Algorithm for customer-provided encryption.
- Server Side Encryption Customer Key: Customer-provided encryption key.
- Server Side Encryption Customer Key MD5: MD5 digest of the encryption key.
- Storage Class: Amazon S3 storage class. Options: Deep Archive, Glacier, Intelligent Tiering, One Zone IA, Standard, Standard IA.
Tags Optional tags to add to the object. Each tag consists of a key-value pair.

Output

  • The output is a JSON object containing the result of the upload operation. Typical fields include:
    • Information about the uploaded file (such as its name, URL, ETag, etc.), depending on the response from Aliyun OSS.
    • On success, the output will reflect the OSS API's response for the put operation.
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Example Output:

[
  {
    "name": "hello.txt",
    "url": "https://your-bucket.oss-region.aliyuncs.com/hello.txt",
    "etag": "\"D41D8CD98F00B204E9800998ECF8427E\"",
    // ...other OSS response fields
  }
]

Dependencies

  • External Services: Requires access to Alibaba Cloud OSS.
  • Credentials: You must configure Aliyun credentials in n8n, including:
    • Access Key ID
    • Access Key Secret
    • Region
  • n8n Configuration: The node requires the "Aliyun" credential type to be set up in your n8n instance.

Troubleshooting

Common Issues:

  • Invalid Credentials:
    Error Message: "InvalidAccessKeyId" or "SignatureDoesNotMatch"
    Resolution: Check that your Access Key ID, Access Key Secret, and Region are correct.

  • Bucket Not Found:
    Error Message: "NoSuchBucket"
    Resolution: Ensure the specified bucket exists and the name is correct.

  • File Already Exists / Permission Denied:
    Error Message: "AccessDenied"
    Resolution: Verify your account has permission to upload to the specified bucket and path.

  • Missing Required Property:
    Error Message: "Parameter 'bucketName' is required"
    Resolution: Make sure all required properties are filled in.

  • Uploading Directory Instead of File:
    Error Message: "Downloading a whole directory is not yet supported, please provide a file key"
    Resolution: For uploads, ensure you specify a valid file name and not a directory.


Links and References

Discussion