yaml
type: "io.kestra.plugin.fs.smb.trigger"
yaml
id: smb_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.smb.Trigger
    host: localhost
    port: "445"
    username: foo
    password: bar
    from: "/my_share/in/"
    interval: PT10S
    action: MOVE
    moveDirectory: "/archive_share/"

yaml
id: smb_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') }}"
      - id: delete
        type: io.kestra.plugin.fs.smb.Delete
        host: localhost
        port: "445"
        username: foo
        password: "{{ secret('SMB_PASSWORD') }}"
        uri: "/my_share/in/{{ taskrun.value | jq('.path') }}"

triggers:
  - id: watch
    type: io.kestra.plugin.fs.smb.Trigger
    host: localhost
    port: "445"
    username: foo
    password: "{{ secret('SMB_PASSWORD') }}"
    from: "/my_share/in/"
    interval: PT10S
    action: NONE

yaml
id: smb_wait_for_csv_in_my_share_my_dir
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.smb.Trigger
    host: localhost
    port: "445"
    username: foo
    password: "{{ secret('SMB_PASSWORD') }}"
    from: "my_share/mydir/"
    regExp: ".*.csv"
    action: MOVE
    moveDirectory: "my_share/archivedir"
    interval: PTS
Properties
Possible Values
MOVEDELETENONE
Default false
Default PT1M
Format duration
Default 445
Default false
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType
SubType string
Format partial-time
Format partial-time
Format partial-time
Default DURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
Format duration
Format duration
Default false
Format date-time
Possible Values
FOLDERFILEFILE_OR_FOLDERIMAGINARY
Format uri
Format date-time
Format time
Format time
Default {{ trigger.date }}
Default {{ trigger.date }}
Possible Values
EQUALSPREFIXSUFFIX
Default false
SubType
Validation RegExp ^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length 1
Default true
Default { "type": "DURATION_WINDOW" }
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Format date-time
Format date-time
Default {{ trigger.date }}
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
SubType string
Possible Values
CREATEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINT
Default {{ trigger.date }}