
File system Trigger
CertifiedTrigger on new local files
File system Trigger
Trigger on new local files
Polls a directory under configured allowed-paths (default every 60s) and fires when files are created or updated.
Limits to maxFiles (default 25) and can MOVE or DELETE matched files; moveDirectory is required when MOVE is chosen.
Example (Kestra config):
plugins:
configurations:
- type: io.kestra.plugin.fs.local
values:
allowed-paths:
- /data/files
type: io.kestra.plugin.fs.local.TriggerExamples
Wait for one or more files in a given local file system's directory and process each of these files sequentially.
id: local_trigger_flow
namespace: company.team
tasks:
- id: for_each_file
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.files }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value | jq('.path') }}"
triggers:
- id: watch
type: io.kestra.plugin.fs.local.Trigger
from: "/home/dev/kestra"
interval: PT10S
action: MOVE
recursive: true
moveDirectory: "/home/dev/archive/"
Properties
from *Requiredstring
Directory to watch
action string
NONEMOVEDELETENONEAction to take on matched files
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
interval Non-dynamicstring
PT1MdurationInterval between checks
maxFiles integerstring
25Maximum files to process per poll
moveDirectory string
Destination directory when action is MOVE
on string
CREATE_OR_UPDATECREATEUPDATECREATE_OR_UPDATETrigger event type
Defines when the trigger fires.
CREATE: only for newly discovered entities.UPDATE: only when an already-seen entity changes.CREATE_OR_UPDATE: fires on either event.
recursive booleanstring
falseInclude files in subdirectories
regExp string
Regex pattern to match file names
stateKey string
State key
JSON-type KV key for persisted state.
Default: <namespace>__<flowId>__<triggerId>
stateTtl string
State TTL
TTL for persisted state entries (e.g., PT24H, P7D).
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
count integer
Number of files that triggered the flow
files array
List of files that triggered the flow, each with its change type
io.kestra.plugin.fs.local.Trigger-TriggeredFile
CREATEUPDATEdate-timedate-timejava.nio.file.Path
date-timeuri