type.inbound
and strings.contains(headers.mailer, "ActiveCampaign")
and (
strings.ilike(body.current_thread.text,
"*Piratini*",
"*45.405.898/0001-16*",
"*Cancelar inscri*",
"*Matem?tica Genial*"
)
or strings.ilike(body.html.raw,
"*belonging to Spun*",
"*affiliated with Spun*"
)
)
and (
length(html.xpath(body.html,
'//*[contains(@style, "background") and contains(@style, "padding")] | //a[contains(@class, "es-button")]'
).nodes
) > 0
or length(html.xpath(body.html, '//a/img').nodes) > 0
)
and ml.nlu_classifier(body.current_thread.text).language == "english"
and not any(ml.nlu_classifier(body.current_thread.text).topics,
.name in ("Health and Wellness", "Entertainment and Sports")
and .confidence == "high"
)
and not (
sender.email.domain.root_domain in $high_trust_sender_root_domains
and coalesce(headers.auth_summary.dmarc.pass, false)
)
Playground
Test against your own EMLs or sample data.