type.inbound
and any(headers.reply_to, .email.email != sender.email.email)
and regex.icontains(subject.subject, '(?:contract agreement|order)_\d{8}\b')
and regex.icontains(body.current_thread.text,
'attached (?:contract agreement|order)'
)
Playground
Test against your own EMLs or sample data.