About this blueprint
Notifications System
This system flow will help you set up alerts for failed workflow executions. Using this pattern, you can manage alerts on failure in one place.
This flow sends an email alert whenever a flow execution fails.
Restricting alerts using conditions
You can restrict the flow to only send alerts for specific namespaces by adding an ExecutionNamespaceCondition
to the trigger. You can read more about that in the Administrator Guide.
yaml
id: failed_alert_email
namespace: system
tasks:
- id: notify
type: io.kestra.plugin.notifications.mail.MailSend
from: [email protected]
to: "[email protected]"
username: "[email protected]"
password: "{{ secret('EMAIL_PASSWORD') }}"
host: smtp.com
port: 465
subject: "Failed Execution - {{ trigger.executionId }}"
htmlTextContent: "{{ trigger.executionId }}"
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- FAILED
- WARNING
More Related Blueprints