Directory Changed
Triggerfolder
trigger.directory_changed
Fires when files change in a watched directory. Unlike the File Changed trigger which monitors a single file, this trigger watches an entire directory and optionally its subdirectories for file system events.
You can filter by event type (created, modified, deleted, or all) and choose whether to recurse into subdirectories. This makes it ideal for watching download folders, project directories, or any location where new files may appear.
Works with iCloud Drive and other cloud folders (Dropbox, OneDrive, Google Drive), including ~/Desktop and ~/Documents when Desktop & Documents syncing is on. A file that syncs in from another device can appear before its contents have downloaded; Wait for iCloud download holds the trigger until the bytes are on this Mac, so the rest of the flow reads a complete file (see Configuration below).
Ports
| Direction | Name | Data Type | Description |
|---|---|---|---|
| Outlet | Output | Any | Payload emitted when a file in the directory changes |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Directory | Directory Picker |
— | Path to the directory to watch |
| Watch Subdirectories | Boolean |
true | Whether to watch inside subdirectories too. Off means this directory's files only: a subfolder appearing or going away does not fire the trigger |
| Event Types | Dropdown |
Created | Filter by event type: Created, Modified, Deleted, or All Events. Defaults to Created so a flow that moves files out of the folder doesn’t re-fire on its own deletions |
| Wait for iCloud download | Boolean |
true | When the file lives only in iCloud Drive or another cloud folder (its bytes aren’t on this Mac yet), download it first and fire once it’s fully here. Uses your internet connection and may use metered data. Turn off to fire immediately with the path — a downstream node that reads the file will then trigger the download itself. |
| Custom Arguments | Key-Value |
— | Additional key-value pairs included in the output payload |
Output Variables
| Variable | Type | Description |
|---|---|---|
filePath |
String | Full path of the changed file |
fileName |
String | Name of the changed file |
directory |
String | Parent directory path |
fileExtension |
String | Lowercased extension without the dot (e.g. pdf) — handy for {{directory}}/{{fileType}}/{{fileName}} sorting |
fileType |
String | Coarse category for organizing by type (Images, Documents, Audio, Videos, Spreadsheets, Presentations, Archives, Other) |
changeType |
String | Type of change (created / modified / deleted) |
timestamp |
String | ISO 8601 timestamp of the event |
Example
Watch a Downloads folder and auto-organize new files by extension: