Filesystem Watcher
Run an automation when files appear or change in a directory.
What it does
Watches a folder on the AI Kit server (or a network drive mounted there). When a file appears, is moved in or changes, the workflow fires once for that file — the trigger waits until the file has stopped growing, so a file that is still being copied is not read half-finished. Temporary and lock files (~$…, .tmp, .part, hidden files such as .DS_Store) are always ignored.
What arrives in memory depends on Convert to Markdown:
- On (default): PDF, Word, Excel, CSV, XML, JSON, HTML and text files arrive as Markdown text — tables as Markdown tables, JSON and XML in a code block. An AI step can use it directly. Files without text (images, archives) arrive as a file.
- Off: the file itself arrives unchanged, with name and type — for example to store it elsewhere with Store file or to attach it to a mail.
This is the simplest way to integrate with any system that can drop files in a folder — file servers, SFTP landing zones, scanners, exports from other tools.
What you configure
| Field | What it controls | Required | Notes |
|---|---|---|---|
| Folder | Folder to watch. | required | Absolute path on the AI Kit server, e.g. /data/incoming. The trigger reports an error if the folder does not exist. |
| Only these files | Patterns of files to react to, separated by semicolons. | optional | Example: *.pdf; *.docx. Empty: every file in the folder. Upper/lower case does not matter. |
| Except these files | Patterns of files to ignore. | optional | Example: *_draft.*. |
| Convert to Markdown | Content as Markdown text or the file itself. | optional | On by default. |
| Network drive (polling) | For SMB/NFS shares that do not report file changes. | optional | Off by default. |
| File content | Where the content is stored. | required | Markdown text, or the file itself if it is not converted. |
| File info (optional) | Path, name, type, size and modification time of the file. | optional | Use {memory://<key>/path} to move or copy the file later with Store file. |
📷 SCREENSHOT: The Filesystem Watcher configuration with the path, include and exclude filters visible.
Example scenario
Order import. An online shop drops one XML file per order into /data/orders/inbox. The filesystem watcher fires for each new *.xml; an AI action extracts customer and items; a Store file step with action move and source file {memory://fileInfo/path} moves the processed file to /data/orders/done.
Recommendations
- ✅ Use a dedicated landing folder with no other writers. Mixing automation triggers with user file activity quickly becomes unpredictable.
- ✅ Leave Only these files empty if every file in the folder should be processed; temporary and lock files are skipped anyway.
- ✅ Move or delete processed files inside the workflow with Store file (action
moveordelete, source file from the file info) to avoid re-processing. - ⚠️ Some upload protocols (SCP, SFTP) write a file in pieces. The trigger waits until the file stops growing; with very slow uploads let the uploader write to a temporary name (
.part,.tmp) and rename on completion. - ❌ Do not point the watcher at a system folder. Pick something the AI Kit owns or has clearly-defined access to.
What to do next
- To store, move or delete files from the workflow: Store file.
- For inbound HTTP: HTTP Webhook.