Triggers

File Changed

Runs your flow the moment one specific file is created, changed, or deleted.

trigger.file_changed
TRIGGERFile Changed

At a glance

Fires when
A file you pick is created, modified, or deleted
Emits
Path, name, extension, file type, change type, timestamp
Works with
Local folders, iCloud Drive, Dropbox, OneDrive, Google Drive

Set it up

Drop the node on the canvas, pick the file in the inspector, and wire its outlet to whatever should happen next. Watchflows listens with macOS file-system events, so there is no polling and no delay.

The inspector for a File Changed trigger. Only the file is required.
The inspector for a File Changed trigger. Only the file is required.

Configure

FieldDefaultWhat it does
File—The file to watch. Choose it with the picker.
Wait for iCloud downloadOnIf the file lives in a cloud folder and its bytes are not on this Mac yet, download it first and fire once it is complete. Turn off to fire on the placeholder.
Custom arguments—Extra key-value pairs merged into the payload.

Output

Every key is available downstream as {{key}}.

KeyTypeValue
filePathStringFull path of the file
fileNameStringName, with extension
fileExtensionStringLowercased, no dot: pdf
fileTypeStringImages, Documents, Audio, Videos, Spreadsheets, Presentations, Archives, or Other
changeTypeStringcreated, modified, or deleted
timestampStringWhen the change was seen, ISO 8601

Example: notify when a config file changes

File Changed watches ~/.config/app.json. Template builds the message from {{fileName}} and {{changeType}}. Notification shows it.

Three nodes. Save the file, get a notification.
Three nodes. Save the file, get a notification.

Paste this into the Flow Builder to get the same flow:

Watch ~/.config/app.json and send me a notification saying which file changed and how.

Good to know

Cloud files can fire before they exist locally. A file synced from another device shows up as a placeholder first. Leave Wait for iCloud download on unless you only care that the file appeared.

Watching a whole folder? Use Directory Changed instead. File Changed is for one file you know the path of.

Editors save in bursts. Some apps write a temp file and rename it, which can look like deleted then created. Branch on {{changeType}} if that matters.