New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Kestra flow when another flow's retry attempt fails. Use the HasRetryAttempt condition to centralize retry monitoring and Slack escalation.
id: flow-condition-hasretryattempt
namespace: company.team
tasks:
- id: send_slack_message
type: io.kestra.plugin.slack.notifications.SlackExecution
url: "{{ secret('SLACK_WEBHOOK') }}"
executionId: "{{ trigger.executionId }}"
payload: "Retry attempt failed for {{ trigger.flowId }}"
triggers:
- id: flow_condition
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.HasRetryAttempt
in:
- FAILED
Catch failing retries across your entire Kestra instance and react automatically. This blueprint wires a Flow trigger to the HasRetryAttempt condition so that whenever a task in any other flow fails a retry attempt, this flow fires and posts a Slack alert. It closes a common observability gap: retries often fail silently inside an execution and teams discover it hours later. Here, every failed retry becomes an event you can route and escalate.
io.kestra.plugin.core.trigger.Flow trigger listens for executions across all flows in the instance.io.kestra.plugin.core.condition.HasRetryAttempt condition with in: [FAILED], so it only fires when a retry attempt entered the FAILED state.send_slack_message task (io.kestra.plugin.slack.notifications.SlackExecution) then posts to a webhook, embedding the execution via executionId: "{{ trigger.executionId }}" and a payload naming {{ trigger.flowId }}.Kestra's event-driven Flow triggers let one flow react to the lifecycle of any other flow, something a tool's own scheduler cannot express because it has no cross-pipeline event bus or shared execution state. The HasRetryAttempt condition filters on retry outcomes specifically, the alerting task itself can be retried, execution lineage is preserved, and everything is declarative YAML you can version, review, and reuse.
A running Kestra instance and a Slack incoming webhook.
SLACK_WEBHOOK: the Slack incoming webhook URL used by send_slack_message.SLACK_WEBHOOK secret.WARNING) to the in list to broaden what counts.SlackExecution for an email, PagerDuty, or webhook task to change escalation.