type.inbound
and sender.email.domain.root_domain in $free_email_providers
// not a reply
and length(headers.references) == 0
and 0 < length(distinct(body.current_thread.links, .href_url.domain.root_domain)
) <= 3
and any(body.links,
any(.href_url.query_params_decoded["email"],
strings.parse_email(.).email in map(recipients.to, .email.email)
)
)
and (
any(ml.nlu_classifier(body.current_thread.text).entities,
.name == "org"
and strings.ilike(.text, "*Date*", "*Dating*", "*Girls*", "*Love*")
)
or any(ml.nlu_classifier(body.current_thread.text).topics, .name == "Romance")
)
Playground
Test against your own EMLs or sample data.