Skip to content

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.

  • 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.

None.

ParameterTypeDefaultDescription
bucketstring—Bucket to filter by. Empty = every bucket in the environment.

Returns a list of dictionaries, one per file:

FieldTypeDescription
idstringFile id.
bucketstringBucket where it lives.
namestringName inside the bucket, including its folders.
sizenumberSize in bytes.
content_typestringDetected content type.
created_atstringCreation 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.

MessageCause 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: ”.

Download every file in the inbox bucket to process it:

List Storage Files bucket = "inbox" → output: files
For Each items = files itemVariable = f
└─ activities:
Download Storage File id = f["id"]
destination = "C:/inbox/" + str(f["name"])