Move to Trash
Actiontrash
action.move_trash
Move a file to the macOS Trash. The source path comes from filePath in config (template-rendered with the upstream payload; defaults to {{filePath}}) or from filePath on the incoming payload. By default this routes through the macOS Trash, so an accidental trash is recoverable — enable Permanent to bypass the Trash and remove the file for good.
This node also acts on a single file by default: a source that resolves to a folder is refused unless you turn on Allow Folders. A package like .app or .numbers is technically a folder on disk, but Finder shows it as a single file, and this node treats it the same way — it's never refused as a folder, with or without Allow Folders. With Allow Folders on, the whole folder and everything inside it is removed. Your home folder and its top-level folders (Desktop, Downloads, Documents, Pictures, Movies, Music) are never accepted as a source, toggle or not — only the folders themselves are refused, and a file inside one of them, like a download sitting in ~/Downloads, is an ordinary source.
Destructive action
This node removes files. The default mode routes through the macOS Trash so deletion is recoverable; toggling permanent bypasses the Trash entirely and the file cannot be undone. With Allow Folders on, the whole folder and everything inside it is removed too — the default recoverable Trash mode is the safer choice when that's what you mean to do. Workflows containing this node prompt for confirmation on every arm.
Ports
| Direction | Name | Data Type | Description |
|---|---|---|---|
| Input | Input | Any | Payload with source file path |
| Output | Output | Any | Payload with trash result |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| filePath | Text | {{filePath}} | Path to the file to trash. Supports {{var}} templating; falls back to filePath on the incoming payload if blank. |
| dryRun | Boolean | false | If true, the node resolves the path, validates safety, and returns the success payload — but does not actually trash the file. |
| permanent | Boolean | false | Bypass the Trash and remove the file directly — irreversible. |
| allowFolders | Boolean | false | Allow the source to be a folder instead of a single file. With this on, the whole folder and everything inside it is removed. |
Output Variables
| Variable | Type | Description |
|---|---|---|
| originalPath | String | Path of the file before trashing |
| trashedPath | String | Resulting path inside the Trash (empty when permanent is true, or in Dry Run) |
| success | Boolean | Whether the trash operation succeeded |
| permanent | Boolean | Whether the file was permanently deleted (Trash bypassed) |
| dryRun | Boolean | Present and true only when Dry Run skipped the actual trash |
Example
Clear out expired downloads, recoverably: