Delete from Storage
Use this action when a workflow should remove a file it no longer needs, and free the space it was using.
Best for
- Cleaning up a report, export, or downloaded file after a later step has used it
- Keeping a workflow that runs on a schedule from filling your storage
- Removing a file you replaced with a newer version
Why it matters
Every run of a workflow that uploads, downloads, or generates a file creates a new file. Nothing removes them for you, and they keep counting toward your storage usage for as long as they exist. A workflow that produces a daily report will keep every one of them unless you delete it.
Add this action as the last step, pointing at the file the earlier step created.
Main fields
| Field | What it does |
|---|---|
| File | The file to delete, usually step(0).file from an upload, download, or document step |
| Bucket and Full path | An alternative to File when you want to point at the file directly |
| Purpose | Optional label for what this step is for, shown in the logs. It does not change which file is deleted |
What later steps can use
| Value | What it is |
|---|---|
step(N).deleted | Always true when the step succeeds |
step(N).existed | Whether the file was still there when it was removed |
step(N).bucket, step(N).fullPath | Which file was deleted |
Files this action will not delete
Some files are in use by AutoTalk itself, and deleting one would break the thing that points at it rather than free anything useful. The step refuses them and fails with storage_delete_protected_purpose:
- Profile pictures — contact, employee, and user avatars
- Your company logo, chat widget icon, and integration icons
- Media received in or sent to conversations, and its converted copies
- Link previews and channel emotes
To remove one of those, change or delete the record that uses it. Deleting a message, for example, already removes the message's own media.
Tips
- Chain it directly: put Upload to storage, Download to storage, or Generate document in one step and this action in a later one, passing
step(0).file. - Remove references first. Nothing checks your records for you — a field still pointing at a deleted file will show a missing file.
- The file has to exist. Deleting something that is already gone fails rather than passing quietly, so a mistyped path tells you instead of silently doing nothing. If your workflow might run twice over the same file, turn on Allow failure for the step.
- Deleting is permanent. There is no undo, and no recycle bin.