Actions12
Folder → Get Many
AI-generatedOverview
The Aliyun OSS node for n8n allows you to interact with Alibaba Cloud's Object Storage Service (OSS). Specifically, the Folder → Get Many operation retrieves a list of folders within a specified bucket. This is useful for automating workflows that need to enumerate directories in cloud storage, such as syncing folder structures, auditing contents, or triggering actions based on folder presence.
Practical examples:
- List all folders in a bucket to display them in a dashboard.
- Use the folder list to trigger further processing for each directory.
- Audit or backup folder structures from Aliyun OSS.
Properties
| Name | Meaning |
|---|---|
| Bucket Name | The name of the OSS bucket from which to retrieve folders. (Required) |
| Return All | Whether to return all results or only up to a given limit. If set to true, all folders 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 between 1 and 500. |
| Options | Additional options for the query: - Fetch Owner: If enabled, includes the owner field with each key in the result. - Folder Key: Restrict results to folders under this prefix (acts as a path filter). |
Output
The output is an array of JSON objects, each representing a folder in the specified bucket. Each object typically contains:
name: The folder's key (path) in the bucket.size: Should be0for folders (since folders themselves do not have size in OSS).- Other metadata fields may be present depending on the options selected (e.g.,
ownerif "Fetch Owner" is enabled).
Example output:
[
{
"name": "photos/",
"size": 0,
"lastModified": "2024-06-01T12:00:00.000Z",
"etag": "\"d41d8cd98f00b204e9800998ecf8427e\""
},
{
"name": "documents/",
"size": 0,
"lastModified": "2024-06-01T13:00:00.000Z",
"etag": "\"d41d8cd98f00b204e9800998ecf8427e\""
}
]
Note: Only items where name ends with / and size is 0 are included.
Dependencies
- Aliyun OSS Account: Requires access credentials (
region,accessKeyId,accessKeySecret) configured in n8n credentials asaliyun. - ali-oss npm package: Used internally for API calls (no user action required).
- n8n configuration: No special environment variables needed beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid credentials: If your access keys or region are incorrect, authentication will fail.
- Bucket not found: If the specified bucket does not exist or is misspelled, no results will be returned or an error will occur.
- Insufficient permissions: The provided credentials must have permission to list objects in the bucket.
- No folders returned: If there are no folders matching the criteria (e.g., wrong "Folder Key" prefix), the result will be an empty array.
Error messages:
"Cannot read property 'endsWith' of undefined": Likely caused by unexpected response structure—check bucket name and permissions."Missing required parameter: bucketName": Ensure the "Bucket Name" property is filled in."Request failed with status code 403": Indicates insufficient permissions for the provided credentials.