
MinIO Trigger
CertifiedTrigger a flow on a new file arrival in a MinIO bucket
MinIO Trigger
Trigger a flow on a new file arrival in a MinIO bucket
This trigger will list every interval a bucket. You can search for all files in a bucket or directory in from or you can filter the files with a regExp. The detection is atomic, internally we do a list and interact only with files listed.
Once a file is detected, we download the file on internal storage and processed with declared action in order to move or delete the files from the bucket (to avoid double detection on new poll).
type: io.kestra.plugin.minio.TriggerExamples
Wait for a list of files on a bucket and iterate through the files.
id: minio_listen
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.objects | jq('.[].uri') }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
triggers:
- id: watch
type: io.kestra.plugin.minio.Trigger
interval: "PT5M"
accessKeyId: "{{ secret('MINIO_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('MINIO_SECRET_KEY_ID') }}"
region: "eu-central-1"
bucket: "my-bucket"
prefix: "sub-dir"
action: MOVE
moveTo:
key: archive"
Wait for a list of files on a bucket and iterate through the files. Delete files manually after processing to prevent infinite triggering.
id: minio_listen
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.objects | jq('.[].key') }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
- id: delete
type: io.kestra.plugin.minio.Delete
accessKeyId: "{{ secret('MINIO_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('MINIO_SECRET_KEY_ID') }}"
region: "eu-central-1"
bucket: "my-bucket"
key: "{{ taskrun.value }}"
triggers:
- id: watch
type: io.kestra.plugin.minio.Trigger
interval: "PT5M"
accessKeyId: "{{ secret('MINIO_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('MINIO_SECRET_KEY_ID') }}"
region: "eu-central-1"
bucket: "my-bucket"
prefix: "sub-dir"
action: NONE
Wait for a list of files on a bucket on an S3-compatible storage — here, Spaces Object Storage from Digital Ocean. Iterate through those files, and move it to another folder.
id: trigger_on_s3_compatible_storage
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.objects | jq('.[].uri') }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
triggers:
- id: watch
type: io.kestra.plugin.minio.Trigger
interval: "PT5M"
accessKeyId: "{{ secret('MINIO_ACCESS_KEY_ID') }}"
secretKeyId: "{{ secret('MINIO_SECRET_KEY_ID') }}"
endpoint: https://<region>>.digitaloceanspaces.com
bucket: "kestra-test-bucket"
prefix: "sub-dir"
action: MOVE
moveTo:
key: archive
Properties
accessKeyId string
Access Key Id for authentication
action string
MOVEDELETENONEAction to apply to listed objects after detection
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
bucket string
The bucket name
caPem string
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
clientPem string
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
delimiter string
A delimiter is a character you use to group keys
endpoint string
URL to the MinIO endpoint
filter string
BOTHFILESDIRECTORYBOTHFilter to apply on listed objects (files, directories, or both)
interval Non-dynamicstring
PT1MdurationInterval between polling.
The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.
marker string
Marker to start listing from a specific key
maxKeys integerstring
1000Maximum number of keys to return per request
moveTo Non-dynamic
The destination bucket and key for the MOVE action
io.kestra.plugin.minio.Copy-CopyObject
The bucket name
The bucket key
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.
prefix string
Limits the response to keys that begin with the specified prefix
regexp string
Regular expression to filter object keys
region string
MinIO region with which the SDK should communicate
secretKeyId string
Secret Key Id for authentication
ssl Non-dynamic
SSL/TLS configuration options
io.kestra.core.http.client.configurations.SslOptions
Whether to disable checking of the remote SSL certificate.
Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.
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
objects array
List of blobs that triggered the flow, each with its change type
io.kestra.plugin.minio.Trigger-TriggeredBlob
CREATEUPDATEdate-timeio.kestra.plugin.minio.model.Owner
uri