File system Trigger

File system Trigger

Certified

Trigger on new FTPS files

Polls a remote directory on the interval and starts a Flow when new files appear. Sorted with sort (default NONE) before maxFiles truncation. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. Use action MOVE/DELETE to prevent repeated triggering; insecureTrustAllCertificates is for testing only.

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

Wait for one or more files in a given FTPS server's directory and process each of these files sequentially.

yaml
id: ftps_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.ftps.Trigger
    host: localhost
    port: 990
    username: foo
    password: "{{ secret('FTPS_PASSWORD') }}"
    from: "/in/"
    interval: PT10S
    action: MOVE
    moveDirectory: "/archive/"

Wait for one or more files in a given FTPS server's directory and process each of these files sequentially. In this example, we restrict the trigger to only wait for CSV files in the mydir directory.

yaml
id: ftp_wait_for_csv_in_mydir
namespace: company.team

tasks:
  - id: each
    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.ftps.Trigger
    host: localhost
    port: "21"
    username: foo
    password: "{{ secret('FTPS_PASSWORD') }}"
    from: "mydir/"
    regExp: ".*.csv"
    action: MOVE
    moveDirectory: "archive/"
    interval: PT10S
    sort: NAME_ASC
Properties
Possible Values
MOVEDELETENONE

Action to perform on retrieved files

MOVE/DELETE remove the file from the watched directory, so the trigger fires on every listed file. NONE leaves the file in place and relies on stateful deduplication (path + size + last-modified) to avoid reprocessing — handle the file in the Flow accordingly.

Directory URI to watch

Remote host

Defaultfalse

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

DefaultP
Possible Values
CSEP

Data channel protection level

PROT command value (P, C, etc.). Default P (encrypted).

Defaultfalse

Enable RSA/SHA1 algorithm

Disabled by default; enable only if the remote server requires it.

Trust all certificates

Skip server certificate validation. Insecure: this disables protection against man-in-the-middle attacks and must not be enabled in production. Use only for testing against self-signed or untrusted certificates.

DefaultPT1M
Formatduration

Interval between trigger checks

Default25

Maximum files to process per poll

DefaultEXPLICIT
Possible Values
IMPLICITEXPLICIT

Select FTPS mode

Choose implicit or explicit FTPS. Default EXPLICIT.

Destination directory when action is MOVE

DefaultCREATE_OR_UPDATE
Possible Values
CREATEUPDATECREATE_OR_UPDATE

Trigger 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.
Default{ "connectionTimeout": "PT30S", "dataTimeout": "PT30S", "socketTimeout": "PT30S", "controlKeepAliveTimeout": "PT30S", "controlKeepAliveReplyTimeout": "PT30S" }

FTP client options

Definitions
connectionTimeoutstring
DefaultPT30S

Control connection timeout

Maximum time to open the control channel. Default 30s.

controlKeepAliveReplyTimeoutstring
DefaultPT30S

Keep-alive reply timeout

How long to wait for keep-alive responses before failing. Default 30s.

controlKeepAliveTimeoutstring
DefaultPT30S

Control keep-alive interval

Sends keep-alive commands during long transfers. Default 30s.

dataTimeoutstring
DefaultPT30S

Data channel timeout

Maximum time to open the data socket. Default 30s.

socketTimeoutstring
DefaultPT30S

Socket read timeout

Timeout for socket reads and writes once connected. Default 30s.

Defaulttrue

Use passive data connections

Passive mode avoids most firewall and NAT issues and is enabled by default (true). Set to false to force active mode.

Password

Default990

Remote port

FTP proxy hostname

FTP proxy port

Possible Values
DIRECTHTTPSOCKS

FTP proxy type

Defaultfalse

List files recursively

Regexp filter on full path

Defaulttrue

Verify data channel IP

Ensures the responding server IP matches the control connection to prevent spoofed data channels.

Defaulttrue

Treat path as user home root

If true (default), remote paths are resolved relative to the authenticated user's home directory.

DefaultNONE
Possible Values
NONELAST_MODIFIED_ASCLAST_MODIFIED_DESCNAME_ASCNAME_DESC

Sort order applied to pending files before maxFiles truncation

NONE (default) preserves the order in which the server returns files. LAST_MODIFIED_ASC/LAST_MODIFIED_DESC sort by last modified date, oldest/newest first. NAME_ASC/NAME_DESC sort alphabetically by file name.

State key

JSON-type KV key for persisted state. Default: <namespace>__<flowId>__<triggerId>

State TTL

TTL for persisted state entries (e.g., PT24H, P7D).

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Username

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
accessDatestring
Formatdate-time
fileTypestring
Possible Values
FOLDERFILEFILE_OR_FOLDERIMAGINARY
flagsinteger
groupIdinteger
namestring
pathstring
Formaturi
permissionsinteger
sizeinteger
symbolicLinkboolean
Defaultfalse
updatedDatestring
Formatdate-time
userIdinteger