type.inbound
and sender.email.domain.domain in $free_email_providers
and any(headers.domains, .root_domain == "sendgrid.net")
and not any(ml.nlu_classifier(body.current_thread.text).intents,
.name == "benign"
)
and not any(ml.nlu_classifier(body.current_thread.text).topics,
.name == "Bounce Back and Delivery Failure Notifications"
)
Playground
Test against your own EMLs or sample data.