type.inbound
and sender.email.domain.root_domain in $free_email_providers
and subject.base == sender.display_name
and length(body.current_thread.text) < 60
and length(filter(attachments, .file_type == "pdf")) == 1
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
.depth == 1
and .file_name == "text"
and strings.icontains(.scan.strings.strings[0], "bank", "direct")
and strings.icontains(.scan.strings.strings[0], "change", "update")
)
)
Playground
Test against your own EMLs or sample data.