File Changed
Triggerdoc
trigger.file_changed
Fires when a specific file is created, modified, or deleted. Use this trigger to watch an individual file for changes — for example, a config file, a log file, or a document you want to react to automatically.
Works with iCloud Drive and other cloud folders (Dropbox, OneDrive, Google Drive). 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).
The trigger uses macOS file system events to detect changes efficiently without polling. When the watched file changes, the node emits a payload with the file path, name, change type, and timestamp.
Ports
| Direction | Name | Data Type | Description |
|---|---|---|---|
| Outlet | Output | Any | Payload emitted when the file changes |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| File | File Picker |
— | Path to the file to watch |
| 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 |
fileExtension |
String | Lowercased extension without the dot (e.g. pdf) |
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 config file and send a notification when it changes: