File system Trigger

File system Trigger

Certified

Trigger on NFS file changes

Polls an NFS directory (default every 60s) and fires when files match on (CREATE/UPDATE). Supports regex filtering, optional recursion, and limits to maxFiles (default 25).

yaml
type: io.kestra.plugin.fs.nfs.Trigger

Trigger a flow when a new CSV file arrives in an NFS directory.

yaml
id: nfs_listen
namespace: company.team

tasks:
  - id: log_files
    type: io.kestra.plugin.core.log.Log
    message: "Received {{ trigger.files | length }} files"

triggers:
  - id: watch_nfs
    type: io.kestra.plugin.fs.nfs.Trigger
    from: /mnt/nfs_input/data
    interval: PT10S
    regExp: '.*\.csv$'
    on: CREATE
Properties

Directory path to watch

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

DefaultPT1M
Formatduration

Interval between checks

Default25

The maximum number of files to retrieve at once

DefaultCREATE_OR_UPDATE
Possible Values
CREATEUPDATECREATE_OR_UPDATE

Trigger condition (CREATE, UPDATE, CREATE_OR_UPDATE)

Defaultfalse

List files recursively

Regular expression to filter files

Unique key for storing the trigger state

Time-to-live for the trigger state

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A 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.

List of files that triggered the flow, each with its change type

Definitions
changeTypestring
Possible Values
CREATEUPDATE
creationTimestring
Formatdate-time

The creation time of the file

isDirectoryboolean

Whether the file is a directory

isHiddenboolean

Whether the file is hidden

isSymbolicLinkboolean

Whether the file is a symbolic link

lastAccessTimestring
Formatdate-time

The last access time of the file

lastModifiedTimestring
Formatdate-time

The last modified time of the file

localPath

The java.nio.file.Path of the file

namestring

The name of the file

sizeinteger
Default0

The size of the file in bytes

uristring
Formaturi

The absolute URI of the file