MinIO Trigger

MinIO Trigger

Certified

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

yaml
type: io.kestra.plugin.minio.Trigger

Wait for a list of files on a bucket and iterate through the files.

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

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

yaml
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

Access Key Id for authentication

Possible Values
MOVEDELETENONE

Action to apply to listed objects after detection

Defaultfalse

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

The bucket name

CA PEM certificate content

CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.

Client PEM certificate content

PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.

A delimiter is a character you use to group keys

URL to the MinIO endpoint

DefaultBOTH
Possible Values
FILESDIRECTORYBOTH

Filter to apply on listed objects (files, directories, or both)

DefaultPT1M
Formatduration

Interval 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 to start listing from a specific key

Default1000

Maximum number of keys to return per request

The destination bucket and key for the MOVE action

Definitions
bucketstring

The bucket name

keystring

The bucket key

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.

Limits the response to keys that begin with the specified prefix

Regular expression to filter object keys

MinIO region with which the SDK should communicate

Secret Key Id for authentication

SSL/TLS configuration options

Definitions
insecureTrustAllCertificatesbooleanstring

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.

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

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 blobs that triggered the flow, each with its change type

Definitions
changeTypestring
Possible Values
CREATEUPDATE
etagstring
keystring
lastModifiedstring
Formatdate-time
owner
displayNamestring
idstring
sizeinteger
uristring
Formaturi