type.inbound
and any(filter(attachments, .file_type == "pdf"),
any(file.explode(.),
strings.icontains(.scan.strings.raw, 'Grant Payment Development')
)
and any(file.explode(.), length(.scan.url.urls) > 0)
)
Playground
Test against your own EMLs or sample data.