<@ULVA73B9P> I am trying to create an automation w...
# marvin-ai
k
@Marvin I am trying to create an automation with a trigger that excludes flows to detect if they have entered the failed state. Is there a way to do this?
m
thought for 346.8 seconds
Short answer: not directly. In Prefect 3.x Automations, the “Flow run enters state: Failed” trigger supports inclusive filters (flow name, deployment, work pool/queue, tags). There isn’t a built‑in “exclude”/“not” operator for filters in the UI or SDK today. Common workarounds: - Invert the problem: positively select only the flows you care about (e.g., add a tag like
alert-on-failure
and filter the trigger by that tag; or select specific deployments/work pools). - Split automations by scope (e.g., one per work pool or per project area) so you’re only alerting on the intended set. If you tell me what you want to exclude by (flow names, deployments, tags, work pools), I’ll map it to the simplest include-style filter and give you the exact steps. I know, an “exclude” toggle would be lovely. The universe remains stubbornly literal.