https://prefect.io logo
Title
m

Muhammad Tariq

02/24/2023, 12:05 AM
Hi everyone, I am trying to create custom automation that will only send me a notification on Slack in case of
n
successive flow failures of a deployment within a
specified
time frame or without any time frame. Don't need alerts for every flow failure. I went through the documentation here and it's not super clear.
<https://docs.prefect.io/ui/automations/#triggers>
Has anyone else tried doing something like this before and could offer some advice or tips? Thanks!
a

Andrew Huang

02/24/2023, 12:36 AM
That sounds interesting! I don’t think it’s possible to do it with automation yet, but you could potentially write code like having a variable / block holding counts of failures that decrements at defined intervals, and then if it exceeds, warn here’s a starting point https://prefecthq.github.io/prefect-slack/#capture-exceptions-and-notify-by-slack-message