<@ULVA73B9P> I have automation to send pipeline fa...
# ask-marvin
a
@Marvin I have automation to send pipeline failures to slack and pagerduty I want to configure alerts only for scheduled one not for manual run version is 2.20
m
In Prefect 2.20, you can configure alerts for scheduled runs through the use of automations and specific event matching. To achieve this for only scheduled runs and not manual ones, you can use Prefect's automation feature to set conditions on the alerts. Here’s a general strategy you can follow: 1. Utilize Automations: Prefect allows you to create automations for specific events during your flow runs. You can specify conditions to trigger alerts via Slack or PagerDuty only for scheduled runs. 2. Filter Using Deployment IDs: Identify your scheduled deployments and associate the alerts with those specific deployment IDs. Prefect automations allow you to set
match_related
conditions, which you can use to filter only specific deployment IDs related to scheduled runs. 3. Event Matching: Use event matching conditions to ensure that alerts are sent only when the events are related to runs from automated deployments and not manual executions. You can achieve this by ensuring that the
match
and
match_related
fields specifically target events stemming from scheduled deployments. You can find more detailed information on creating automations and using event matching in Prefect 2.20 in their documentation: - Automations: Prefect Automations - Scheduling: Prefect Schedules Following these steps should allow you to send alerts for scheduled runs only, excluding any manually triggered runs. If you have further questions, feel free to ask!