List Storage Files
List Storage Files
Section titled “List Storage Files”Type: storage-list-files · Package: Storage Activities v1.0.5 · Output: List<Dictionary<string,object>>
Lists the files in Zoan Cloud Storage for the environment where the robot runs. Use it to process everything that arrived in a bucket (for example, documents people upload from the portal) or to check whether a file already exists.
How it works
Section titled “How it works”- With
bucket, it returns only the files in that bucket. - Without
bucket, it returns the files in every bucket of the environment (excluding buckets reserved by Zoan Cloud).
The result is sorted by bucket and by name, and includes all files (there’s no paging). Each element is a file reference.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
bucket | string | — | Bucket to filter by. Empty = every bucket in the environment. |
Output
Section titled “Output”Returns a list of dictionaries, one per file:
| Field | Type | Description |
|---|---|---|
id | string | File id. |
bucket | string | Bucket where it lives. |
name | string | Name inside the bucket, including its folders. |
size | number | Size in bytes. |
content_type | string | Detected content type. |
created_at | string | Creation date (ISO 8601, UTC). |
If there are no files (or the given bucket doesn’t exist yet), it returns an empty list: that’s not an error.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
… HTTP 400: …Invalid bucket name… | The bucket name has characters that aren’t allowed. |
… HTTP 404: … (BUCKET_NOT_FOUND) | You asked for a bucket reserved by Zoan Cloud, which can’t be listed. |
Storage activities require a Zoan Cloud runtime context. Missing: … | The process isn’t running from Zoan Cloud or from the Designer signed in. |
Errors arrive with the prefix “Could not list the files: ”.
Example
Section titled “Example”Download every file in the inbox bucket to process it:
List Storage Files bucket = "inbox" → output: filesFor Each items = files itemVariable = f └─ activities: Download Storage File id = f["id"] destination = "C:/inbox/" + str(f["name"])Related activities
Section titled “Related activities”- Download Storage File — download each file.
- Delete Storage File — clean up the bucket when you’re done.
- Upload Storage File — upload new files.