
File system Trigger
CertifiedTrigger on new FTPS files
File system Trigger
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.
type: io.kestra.plugin.fs.ftps.TriggerExamples
Wait for one or more files in a given FTPS server's directory and process each of these files sequentially.
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.
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
action *Requiredstring
MOVEDELETENONEAction 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.
from *Requiredstring
Directory URI to watch
host *Requiredstring
Remote host
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
dataChannelProtectionLevel string
PCSEPData channel protection level
PROT command value (P, C, etc.). Default P (encrypted).
enableSshRsa1 booleanstring
falseEnable RSA/SHA1 algorithm
Disabled by default; enable only if the remote server requires it.
insecureTrustAllCertificates booleanstring
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.
interval Non-dynamicstring
PT1MdurationInterval between trigger checks
maxFiles integerstring
25Maximum files to process per poll
mode string
EXPLICITIMPLICITEXPLICITSelect FTPS mode
Choose implicit or explicit FTPS. Default EXPLICIT.
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.
options Non-dynamic
{
"connectionTimeout": "PT30S",
"dataTimeout": "PT30S",
"socketTimeout": "PT30S",
"controlKeepAliveTimeout": "PT30S",
"controlKeepAliveReplyTimeout": "PT30S"
}FTP client options
io.kestra.plugin.fs.ftp.FtpInterface-Options
PT30SControl connection timeout
Maximum time to open the control channel. Default 30s.
PT30SKeep-alive reply timeout
How long to wait for keep-alive responses before failing. Default 30s.
PT30SControl keep-alive interval
Sends keep-alive commands during long transfers. Default 30s.
PT30SData channel timeout
Maximum time to open the data socket. Default 30s.
PT30SSocket read timeout
Timeout for socket reads and writes once connected. Default 30s.
passiveMode booleanstring
trueUse 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 string
Password
port string
990Remote port
proxyHost string
FTP proxy hostname
proxyPort string
FTP proxy port
proxyType string
DIRECTHTTPSOCKSFTP proxy type
recursive booleanstring
falseList files recursively
regExp string
Regexp filter on full path
remoteIpVerification booleanstring
trueVerify data channel IP
Ensures the responding server IP matches the control connection to prevent spoofed data channels.
rootDir booleanstring
trueTreat path as user home root
If true (default), remote paths are resolved relative to the authenticated user's home directory.
sort string
NONENONELAST_MODIFIED_ASCLAST_MODIFIED_DESCNAME_ASCNAME_DESCSort 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.
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).
username string
Username
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
files array
List of files that triggered the flow, each with its change type
io.kestra.plugin.fs.vfs.Trigger-TriggeredFile
CREATEUPDATEdate-timeFOLDERFILEFILE_OR_FOLDERIMAGINARYurifalsedate-time