KeyValue Trigger
AI-generatedSummary
Watch a specified directory for new or modified record files matching an optional filename pattern, polling at a defined interval, and emit events with filenames and optionally their contents when changes occur.
Inputs
- Directory Name (required) — Specifies the directory path to monitor for changes to record files.
- Poll Time — Sets the interval in seconds between directory scans, with a minimum of 5 seconds.
- Watch Events (required) — Selects which file events to trigger on, either when files are created ('add') or modified ('change').
- Key Filter — A glob pattern to filter filenames to watch, such as 'user_*'. Wildcards '*' and '?' are supported; empty matches all.
- Include Content — Determines whether to read and include the content of changed or added files in the emitted data; disabling improves performance if only filenames are needed.
Output shape
A list of JSON objects, each representing an added or changed file event within the watched directory during each poll.
Each emitted object includes the directory name, filename ('key'), event type ('add' or 'change'), last modified timestamp (mtimeMs), and optionally file content under 'value' if Include Content is enabled. The node polls continuously and emits arrays of these change events each time changes are detected.