type.inbound
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
.depth == 0
and any(.scan.strings.strings,
strings.contains(., "[<C57237C22450666518136DE404118E5E>")
)
)
)
Playground
Test against your own EMLs or sample data.