Skip to content

Delete Storage File

Type: storage-delete-file  ·  Package: Storage Activities v1.0.5

Deletes a file from a bucket in Zoan Cloud Storage. Use it to clean up temporary or already processed files and free up the organization’s storage.

  1. Identifies the file by its id or by bucket + name. If you set id, bucket and name are ignored.
  2. Deletes it permanently: there’s no recycle bin.

It fails if the file doesn’t exist in the environment or if the bucket is marked as read-only. So if you call it twice with the same reference, the second call fails with File not found: if your flow may repeat the delete, catch that error with Try / Catch.

None. But you must set id or name; otherwise the activity fails with “Provide ‘id’ or ‘name’.”.

ParameterTypeDefaultDescription
idstring—File id (alternative to bucket + name).
namestring—File name inside the bucket, including its folders. E.g.: 2026/sales.xlsx.
bucketstring"default"Bucket name. Only used with name.

This activity does not return a value.

MessageCause and fix
Provide 'id' or 'name'.You set neither id nor name.
… HTTP 404: …File not found in this environment.The file doesn’t exist in the environment (or was already deleted).
… HTTP 400: …Bucket '…' is read-only; deletes are not allowed.The bucket is read-only. An administrator can change it in Storage.
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 delete the file: ”.

Download a file, process it and delete it from the bucket:

Download Storage File bucket = "inbox" name = "order-0001.csv"
destination = "C:/work/order-0001.csv" → output: path
... process the order reading = path ...
Delete Storage File bucket = "inbox" name = "order-0001.csv"