Core Plugins and tasks Flow

Core Plugins and tasks Flow

Certified

Trigger a Flow based on other Flows’ executions.

Fires when upstream Flow executions meet preconditions (required) and optional trigger conditions (no Pebble templating). Lets you chain Flows owned by different teams.

Upstream execution outputs are exposed under trigger.outputs; you can also pass inputs to the downstream Flow.

yaml
type: io.kestra.plugin.core.trigger.Flow
  1. Trigger the transform flow after the extract flow finishes successfully. The extract flow generates a date output that is passed to the transform flow as an input.
id: extract
namespace: company.team

tasks: 
  - id: final_date
    type: io.kestra.plugin.core.debug.Return
    format: "{{ execution.startDate | dateAdd(-2, 'DAYS') | date('yyyy-MM-dd') }}"

outputs: 
  - id: date
    type: STRING
    value: "{{ outputs.final_date.value }}"

The transform flow is triggered after the extract flow finishes successfully.

yaml
id: transform
namespace: company.team

inputs:
  - id: date
    type: STRING
    defaults: "2025-01-01"

variables:
  result: |
    Ingestion done in {{ trigger.executionId }}.
    Now transforming data up to {{ inputs.date }}

tasks:
  - id: run_transform
    type: io.kestra.plugin.core.debug.Return
    format: "{{ render(vars.result) }}"

  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "{{ render(vars.result) }}"

triggers:
  - id: run_after_extract
    type: io.kestra.plugin.core.trigger.Flow
    inputs:
      date: "{{ trigger.outputs.date }}"
    preconditions:
      id: flows
      flows:
        - namespace: company.team
          flowId: extract
          states: [SUCCESS]

  1. Trigger the silver_layer flow once the bronze_layer flow finishes successfully by 9 AM.
id: bronze_layer
namespace: company.team

tasks: 
  - id: raw_data
    type: io.kestra.plugin.core.log.Log
    message: Ingesting raw data
yaml
id: silver_layer
namespace: company.team

tasks:
  - id: transform_data
    type: io.kestra.plugin.core.log.Log
    message: deduplication, cleaning, and minor aggregations

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    preconditions:
      id: bronze_layer
      timeWindow:
        type: DAILY_TIME_DEADLINE
        deadline: "09:00:00"
      flows:
        - namespace: company.team
          flowId: bronze_layer
          states: [SUCCESS]

  1. Create a System Flow to send a Slack alert on any failure or warning state within the company namespace. This example uses the Slack webhook secret to notify the #general channel about the failed flow.
yaml
id: alert
namespace: system

tasks:
  - id: send_alert
    type: io.kestra.plugin.notifications.slack.SlackExecution
    url: "{{secret('SLACK_WEBHOOK')}}" # format: https://hooks.slack.com/services/xzy/xyz/xyz
    channel: "#general"
    executionId: "{{trigger.executionId}}"

triggers:
  - id: alert_on_failure
    type: io.kestra.plugin.core.trigger.Flow
    states:
      - FAILED
      - WARNING
    preconditions:
      id: company_namespace
      where:
        - id: company
          filters:
            - field: NAMESPACE
              type: STARTS_WITH
              value: company

  1. Create a System Flow to send a Sentry issue on any failure or warning state within the company.payroll namespace. This example uses the Sentry Execution task and a Flow trigger with conditions.
yaml
id: sentry_execution_example
namespace: company.team

tasks:
- id: send_alert
  type: io.kestra.plugin.notifications.sentry.SentryExecution
  executionId: "{{ trigger.executionId }}"
  transaction: "/execution/id/{{ trigger.executionId }}"
  dsn: "{{ secret('SENTRY_DSN') }}"
  level: ERROR

triggers:
- id: failed_prod_workflows
  type: io.kestra.plugin.core.trigger.Flow
  conditions:
  - type: io.kestra.plugin.core.condition.ExecutionStatus
    in:
      - FAILED
      - WARNING
  - type: io.kestra.plugin.core.condition.ExecutionNamespace
    namespace: company.payroll
    prefix: false

  1. Chain two different flows (flow_a and flow_b) and trigger the second only after the first completes successfully with matching labels. Note that this example is two separate flows.
yaml
id: flow_a
namespace: company.team
labels:
  type: orchestration
tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello World!
---
id: flow_b
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello World!

triggers:
  - id: on_completion
    type: io.kestra.plugin.core.trigger.Flow
    states: [SUCCESS]
    labels:
      type: orchestration
    preconditions:
      id: flow_a
        id: flow_a
        where:
          - id: label_filter
            filters:
              - field: EXPRESSION
                type: IS_TRUE
                value: "{{ labels.type == 'orchestration' }}
Properties
Defaultfalse

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

List of conditions in order to limit the flow trigger.

Definitions

Compares a rendered date (defaults to {{ trigger.date }}) against optional after and before bounds expressed as ISO-8601 datetimes with zone.

You must provide at least one bound; if both are set the date must fall strictly between them. Missing both bounds triggers an evaluation error.

Example

Trigger condition to execute the flow only after the specific date.

yaml
id: schedule_condition_datetimebetween
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute once every 5 minutes after the date 2025-12-31T23:59:59Z"

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/5 * * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.DateTimeBetween
        date: "{{ trigger.date }}"
        after: "2025-12-31T23:59:59Z"

Trigger condition to execute the flow between two specific dates.

yaml
id: schedule_condition_datetimebetween
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will be executed once every 5 minutes between the before and after dates"

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/5 * * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.DateTimeBetween
        date: "{{ trigger.date }}"
        after: "2025-01-01T00:00:00Z"
        before: "2025-12-31T23:59:59Z"
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DateTimeBetweenio.kestra.core.models.conditions.types.DateTimeBetweenConditionio.kestra.plugin.core.condition.DateTimeBetweenCondition
afterstring

The date to test must be after this one.

Must be a valid ISO 8601 datetime with the zone identifier (use 'Z' for the default zone identifier).

beforestring

The date to test must be before this one.

Must be a valid ISO 8601 datetime with the zone identifier (use 'Z' for the default zone identifier).

datestring
Default{{ trigger.date }}

The date to test.

Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.

Renders a date (defaults to the trigger timestamp) and checks its day-of-week against the provided dayOfWeek.

Accepts ISO-8601 date/time strings; the comparison uses the rendered timezone.

Example

Trigger condition to execute the flow only on a specific day of the week.

yaml
id: schedule_condition_dayweek
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute only on Mondays at 11:00 am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.DayWeek
        dayOfWeek: "MONDAY"
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY

The day of week.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DayWeekio.kestra.core.models.conditions.types.DayWeekConditionio.kestra.plugin.core.condition.DayWeekCondition
datestring
Default{{ trigger.date }}

The date to test.

Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.

Renders a date (defaults to the trigger timestamp) and checks whether it matches the requested weekday and position in the month (FIRST, SECOND, THIRD, FOURTH, or LAST).

Useful for patterns like “first Monday” or “last Friday”. Dates must be valid ISO-8601 strings.

Example

Trigger condition to execute the flow only on the first Monday of the month.

yaml
id: schedule_condition_dayweekinmonth
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute only on the first Monday of the month at 11:00 am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.DayWeekInMonth
        dayOfWeek: "MONDAY"
        dayInMonth: FIRST
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTH

Are you looking for the first or the last day in the month?

dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY

The day of week.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DayWeekInMonthio.kestra.plugin.core.condition.DayWeekInMonthConditionio.kestra.core.models.conditions.types.DayWeekInMonthCondition
datestring
Default{{ trigger.date }}

The date to test.

Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.

Passes only when the triggering execution belongs to the given Namespace and Flow ID.

Pair with the Flow trigger to react to a single upstream flow; for broader namespace matching use ExecutionNamespace.

Example

Trigger condition to execute the flow based on execution of another flow.

yaml
id: flow_condition_executionflow
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute when flow `flow_a` of namespace `company.team` enters RUNNING state."

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionFlow
        flowId: flow_a
        namespace: company.team
    states:
      - RUNNING
flowId*Requiredstring

The Flow ID

namespace*Requiredstring

The Flow Namespace

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionFlowio.kestra.plugin.core.condition.ExecutionFlowConditionio.kestra.core.models.conditions.types.ExecutionFlowCondition

Evaluates true only if the execution carries all provided labels. Labels can be declared as a map or list; system-reserved labels are rejected.

Useful for filtering Flow triggers to specific environments, owners, or any custom tagging strategy.

Example

Trigger condition to execute the flow based on execution of another flow(s) with certain execution labels.

yaml
id: flow_condition_executionlabels
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute when flow with specified labels enters FAILED state."

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionLabels
        labels:
          owner: john.doe
          env: prod
    states:
      - FAILED
labels*Requiredarrayobject

List of labels to match in the execution.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionLabelsio.kestra.core.models.conditions.types.ExecutionLabelsConditionio.kestra.plugin.core.condition.ExecutionLabelsCondition

Compares the triggering execution’s namespace against a target string using EQUALS, PREFIX, or SUFFIX. The prefix boolean is a shorthand for comparison: PREFIX.

If no comparison is set, it defaults to strict equality unless prefix is true.

Example

Trigger condition to execute the flow based on execution of another flow(s) belonging to certain namespace.

yaml
id: flow_condition_executionnamespace
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute when any flow within `company.engineering` namespace enters RUNNING state."

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionNamespace
        namespace: company.engineering
        comparison: PREFIX
    states:
      - RUNNING
namespace*Requiredstring

String against which to match the execution namespace depending on the provided comparison.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionNamespaceio.kestra.core.models.conditions.types.ExecutionNamespaceConditionio.kestra.plugin.core.condition.ExecutionNamespaceCondition
comparisonstring
Possible Values
EQUALSPREFIXSUFFIX

Comparison to use when checking if namespace matches. If not provided, it will use EQUALS by default.

prefixbooleanstring
Defaultfalse

Whether to look at the flow namespace by prefix. Shortcut for comparison: PREFIX.

Only used when comparison is not set

Renders the provided boolean expression against the upstream execution outputs exposed under trigger.outputs.

If the execution exposes no outputs the condition is false and the expression is skipped. A rendered result of blank, space-only, or literal false is treated as false.

Example

The upstream flow_a must explicitly define its outputs to be used in the ExecutionOutputs condition.

id: flow_a
namespace: company.team

inputs: 
  - id: user_value
    type: STRING
    defaults: hello

tasks: 
  - id: hello
    type: io.kestra.plugin.core.debug.Return
    format: "{{ inputs.user_value }}"

outputs: 
  - id: flow_a_output
    type: STRING
    value: "{{ outputs.hello.value }}"

The flow_condition_executionoutputs will run whenever flow_a finishes successfully and returns an output matching the value 'hello':

yaml
id: flow_condition_executionoutputs
namespace: company.team

tasks:
  - id: upstream_outputs
    type: io.kestra.plugin.core.log.Log
    message: hello from a downstream flow

triggers:
  - id: condition_on_flow_execution_outputs
    type: io.kestra.plugin.core.trigger.Flow
    states:
      - SUCCESS
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionOutputs
        expression: "{{ trigger.outputs.flow_a_output == 'hello' }}"
expression*Requiredbooleanstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionOutputsio.kestra.core.models.conditions.types.ExecutionOutputsConditionio.kestra.plugin.core.condition.ExecutionOutputsCondition

Passes when the triggering execution’s current state is included in in and not present in notIn.

If a list is empty it is ignored, so provide at least one of them to avoid unintentionally matching everything.

Example

Trigger condition to execute the flow based on execution status of another flow(s).

yaml
id: flow_condition_executionstatus
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute when any flow enters FAILED or KILLED state."

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.ExecutionStatus
        in:
          - FAILED
          - KILLED
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionStatusio.kestra.core.models.conditions.types.ExecutionStatusConditionio.kestra.plugin.core.condition.ExecutionStatusCondition
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of states that are authorized.

notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of states that aren't authorized.

Renders a templated expression and treats the result as truthy/falsey to decide whether the condition passes.

Blank strings or the literal false (case-sensitive) evaluate to false; everything else is true. Expressions can reference any flow variables available at evaluation time, so make sure they resolve without errors.

Example

Trigger condition to execute the flow when the expression evaluates to true.

yaml
id: myflow
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Average value has gone below 10

triggers:
  - id: expression_trigger
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/1 * * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Expression
        expression: "{{ kv('average_value') < 10 }}"
expression*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Expressionio.kestra.plugin.core.condition.ExpressionConditionio.kestra.core.models.conditions.types.VariableCondition

Passes if any task run has more than one attempt and its state satisfies in / notIn filters.

Provide in states to avoid matching nothing (an empty in list fails all attempts). Use with Flow triggers to react when retries occur.

Example

Trigger condition when any flow task on retry enters the state specified in the in states under the HasRetryAttempt condition.

yaml
id: flow_condition_hasretryattempt
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute when any flow task on retry enters a specific state(s)."

triggers:
  - id: flow_condition
    type: io.kestra.plugin.core.trigger.Flow
    conditions:
      - type: io.kestra.plugin.core.condition.HasRetryAttempt
        in:
          - FAILED
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.HasRetryAttemptio.kestra.plugin.core.condition.HasRetryAttemptConditionio.kestra.core.models.conditions.types.HasRetryAttemptCondition
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of states that are authorized.

notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of states that aren't authorized.

Fails the evaluation if any nested condition is true; otherwise passes.

Combine with other schedule conditions to express “not these dates/states” patterns.

Example

Trigger condition to execute the flow when the condition is not satisfied.

yaml
id: schedule_condition_not
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute on all days except Sunday at 11am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Not
        conditions:
          - type: io.kestra.plugin.core.condition.DayWeek
            dayOfWeek: "SUNDAY"
conditions*Required
Min items1

The list of conditions to exclude.

If any condition is true, it will prevent the event's execution.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Notio.kestra.core.models.conditions.types.NotConditionio.kestra.plugin.core.condition.NotCondition

Evaluates nested conditions and succeeds if at least one passes.

Useful for schedule scenarios like “weekends or holidays” without duplicating triggers.

Example

Trigger condition to execute the flow when any of the conditions are satisfied.

yaml
id: schedule_condition_or
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute on Sundays and Mondays at 11am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Or
        conditions:
          - type: io.kestra.plugin.core.condition.DayWeek
            dayOfWeek: "MONDAY"
          - type: io.kestra.plugin.core.condition.DayWeek
            dayOfWeek: "SUNDAY"
conditions*Required
Min items1

The list of conditions to validate.

If any condition is true, it will allow the event's execution.

type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Orio.kestra.core.models.conditions.types.OrConditionio.kestra.plugin.core.condition.OrCondition

Uses the Jollyday calendar to check whether a rendered date (defaults to {{ trigger.date }}) is a public holiday for the given country/sub-division.

If country is omitted, the default locale is used. Provide ISO 3166-1 (country) and optionally 3166-2 (region) codes.

Example

Trigger condition to execute the flow only on public holidays.

yaml
id: schedule_condition_public-holiday
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute only on the public holidays of France at 11:00 am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.PublicHoliday
        country: FR

Trigger condition to execute the flow only on work days in France.

yaml
id: schedule-condition-work-days
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute only on the work days of France at 11:00 am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Not
        conditions:
          - type: io.kestra.plugin.core.condition.PublicHoliday
            country: FR
          - type: io.kestra.plugin.core.condition.Weekend
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.PublicHolidayio.kestra.plugin.core.condition.PublicHolidayConditionio.kestra.core.models.conditions.types.PublicHolidayCondition
countrystring

ISO 3166-1 alpha-2 country code. If not set, it uses the country code from the default locale.

It uses the Jollyday library for public holiday calendar that supports more than 70 countries.

datestring
Default{{ trigger.date}}

The date to test.

Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.

subDivisionstring

ISO 3166-2 country subdivision (e.g., provinces and states) code.

It uses the Jollyday library for public holiday calendar that supports more than 70 countries.

Compares the rendered date/time (defaults to the trigger timestamp) against optional after and before offsets (ISO-8601 times).

Supports ranges that cross midnight (e.g., 22: 00→02: 00). At least one bound is required; missing both raises an evaluation error.

Example

Trigger condition to execute the flow between two specific times.

yaml
id: schedule_condition_timebetween
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute every 5 minutes between 4pm and 8pm."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "*/5 * * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.TimeBetween
        after: "16:00:00+02:00"
        before: "20:00:00+02:00"
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.TimeBetweenio.kestra.plugin.core.condition.TimeBetweenConditionio.kestra.core.models.conditions.types.TimeBetweenCondition
afterstring

The time to test must be after this one.

Must be a valid ISO 8601 time with offset.

beforestring

The time to test must be before this one.

Must be a valid ISO 8601 time with offset.

datestring
Default{{ trigger.date }}

The time to test.

Can be any variable or any valid ISO 8601 time. By default, it will use the trigger date.

Renders a date (defaults to the trigger timestamp) and passes only if it falls on Saturday or Sunday.

Accepts ISO-8601 date/time strings; uses the rendered timezone to determine the day.

Example

Trigger the flow only on weekend, i.e. on Saturdays and Sundays.

yaml
id: schedule_condition_weekend
namespace: company.team

tasks:
  - id: log_message
    type: io.kestra.plugin.core.log.Log
    message: "This flow will execute only on weekends at 11:00 am."

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: "0 11 * * *"
    conditions:
      - type: io.kestra.plugin.core.condition.Weekend
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Weekendio.kestra.plugin.core.condition.WeekendConditionio.kestra.core.models.conditions.types.WeekendCondition
datestring
Default{{ trigger.date }}

The date to test.

Can be any variable or any valid ISO 8601 datetime. By default, it will use the trigger date.

Pass upstream flow's outputs to inputs of the current flow.

The inputs property passes data objects or a file to the downstream flow as long as those outputs are defined on the flow-level in the upstream flow. ::alert{type="warning"} Make sure that the inputs and task outputs defined in this Flow trigger match the outputs of the upstream flow. Otherwise, the downstream flow execution will not to be created. If that happens, go to the Logs tab on the Flow page to investigate the error. ::

Reference (ref) of the pluginDefaults to apply to this trigger.

Preconditions on upstream flow executions

Express preconditions to be met, on a time window, for the flow trigger to be evaluated.

Definitions
id*Requiredstring
Validation RegExp^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length1

A unique id for the preconditions

flowsarray

A list of preconditions to meet, in the form of upstream flows

namespace*Requiredstring

The namespace of the flow

flowIdstring

The flow ID

labelsobject

A key/value map of labels

statesarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

The execution states

resetOnSuccessboolean
Defaulttrue

Whether to reset the evaluation results of preconditions after a first successful evaluation within the given time window

By default, after a successful evaluation of the set of preconditions, the evaluation result is reset. This means the same set of conditions needs to be successfully evaluated again within the same time window to trigger a new execution. In this setup, to create multiple executions, the same set of conditions must be evaluated to true multiple times within the defined window. You can disable this by setting this property to false, so that within the same window, each time one of the conditions is satisfied again after a successful evaluation, it will trigger a new execution.

timeWindow
Default{ "type": "DURATION_WINDOW" }

Define the time window for evaluating preconditions.

You can set the type of timeWindow to one of the following values:

  1. DURATION_WINDOW: this is the default type. It uses a start time (windowAdvance) and end time (window) that advance to the next interval whenever the evaluation time reaches the end time, based on the defined duration window. For example, with a 1-day window (the default option: window: PT1D), the preconditions are evaluated during a 24-hour period starting at midnight (i.e., at "00: 00: 00+00: 00") each day. If you set windowAdvance: PT6H, the window will start at 6 AM each day. If you set windowAdvance: PT6H and also override the window property to PT6H, the window will start at 6 AM and last for 6 hours. In this configuration, the preconditions will be evaluated during the following intervals: 06: 00 to 12: 00, 12: 00 to 18: 00, 18: 00 to 00: 00, and 00: 00 to 06: 00.
  2. SLIDING_WINDOW: this option evaluates preconditions over a fixed time window but always goes backward from the current time. For example, a sliding window of 1 hour (window: PT1H) evaluates executions within the past hour (from one hour ago up to now). It uses a default window of 1 day.
  3. DAILY_TIME_DEADLINE: this option declares that preconditions should be met "before a specific time in a day." Using the string property deadline, you can configure a daily cutoff for evaluating preconditions. For example, deadline: "09: 00: 00" specifies that preconditions must be met from midnight until 9 AM UTC time each day; otherwise, the flow will not be triggered.
  4. DAILY_TIME_WINDOW: this option declares that preconditions should be met "within a specific time range in a day". For example, a window from startTime: "06: 00: 00" to endTime: "09: 00: 00" evaluates executions within that interval each day. This option is particularly useful for defining freshness conditions declaratively when building data pipelines that span multiple teams and namespaces. Normally, a failure in any task in your flow will block the entire pipeline, but with this decoupled flow trigger alternative, you can proceed as soon as the data is successfully refreshed within the specified time window.
deadlinestring
Formatpartial-time

SLA daily deadline

Use it only for DAILY_TIME_DEADLINE SLA.

endTimestring
Formatpartial-time

SLA daily end time

Use it only for DAILY_TIME_WINDOW SLA.

startTimestring
Formatpartial-time

SLA daily start time

Use it only for DAILY_TIME_WINDOW SLA.

typestring
DefaultDURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW

The type of the SLA

The default SLA is a sliding window (DURATION_WINDOW) with a window of 24 hours.

windowstring
Formatduration

The duration of the window

Use it only for DURATION_WINDOW or SLIDING_WINDOW SLA. See ISO_8601 Durations for more information of available duration value. The start of the window is always based on midnight except if you set windowAdvance parameter. Eg if you have a 10 minutes (PT10M) window, the first window will be 00: 00 to 00: 10 and a new window will be started each 10 minutes

windowAdvancestring
Formatduration

The window advance duration

Use it only for DURATION_WINDOW SLA. Allow to specify the start time of the window Eg: you want a window of 6 hours (window=PT6H), by default the check will be done between: 00: 00 and 06: 00, 06: 00 and 12: 00, 12: 00 and 18: 00, and 18: 00 and 00: 00. If you want to check the window between 03: 00 and 09: 00, 09: 00 and 15: 00, 15: 00 and 21: 00, and 21: 00 and 3: 00, you will have to shift the window of 3 hours by settings windowAdvance: PT3H

wherearray

A list of preconditions to meet, in the form of execution filters

filters*Requiredarray
Min items1

The list of filters

field*Requiredstring
Possible Values
FLOW_IDNAMESPACESTATEEXPRESSION

The field which will be filtered

type*Requiredstring
Possible Values
EQUAL_TONOT_EQUAL_TOINNOT_INIS_TRUEIS_FALSEIS_NULLIS_NOT_NULLSTARTS_WITHENDS_WITHREGEXCONTAINS

The type of filter

Can be set to one of the following: EQUAL_TO, NOT_EQUAL_TO, IS_NULL, IS_NOT_NULL, IS_TRUE, IS_FALSE, STARTS_WITH, ENDS_WITH, REGEX, CONTAINS. Depending on the type, you will need to also set the value or values property.

valuestring

The single value to filter the field on

Must be set according to its type.

valuesarray
SubTypestring

The list of values to filter the field on

Must be set for the following types: IN, NOT_IN.

id*Requiredstring
Min length1

A unique identifier for the filter

operandstring
DefaultAND
Possible Values
ANDOR

The operand to apply between all filters of the precondition

SubTypestring
Default[ "SUCCESS", "WARNING", "FAILED", "KILLED", "CANCELLED", "RETRIED", "SKIPPED", "RESUBMITTED", "PAUSED" ]
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states that will be evaluated by the trigger

By default, only executions in a terminal state or in the PAUSED state will be evaluated. Any ExecutionStatus-type condition will be evaluated after the list of states. Note that a Flow trigger cannot react to the CREATED state because the Flow trigger reacts to state transitions. The CREATED state is the initial state of an execution and does not represent a state transition. ::alert{type="info"} The trigger will be evaluated for each state change of matching executions. If a flow has two Pause tasks, the execution will transition from PAUSED to a RUNNING state twice — one for each Pause task. In this case, a Flow trigger listening to a PAUSED state will be evaluated twice. ::

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

The execution ID that triggered the current flow

The execution labels that triggered the current flow

The flow ID whose execution triggered the current flow

The flow revision that triggered the current flow

The namespace of the flow that triggered the current flow

Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

The execution state

The extracted outputs from the flow that triggered the current flow