type.inbound
and sender.email.email == "no-reply@filemail.com"
and (
any(headers.reply_to,
.email.domain.root_domain != "filemail.com"
and regex.imatch(.email.local_part, '[a-z]{3,}\d{3,6}')
)
or any(html.xpath(body.html, '//td[span[normalize-space(text())="Subject:"]]').nodes,
regex.icontains(.display_text,
'\b(?:invoice|invoices|estimate|estimates|remittance|statement|statements|purchase order|proforma|billing|payment|receipt|quotation|ach|wire transfer)\b'
)
)
)
Playground
Test against your own EMLs or sample data.