type.inbound
and any(attachments,
.file_type == "pdf"
// a single page pdf
and beta.parse_exif(.).page_count == 1
and any(file.explode(.),
length(.scan.pdf.urls) == 1
and any(.scan.pdf.urls,
strings.contains(.path, '.html')
and // links directly to a S3 bucket
.domain.root_domain == "amazonaws.com"
and strings.icontains(.domain.subdomain, "s3")
)
)
)
Playground
Test against your own EMLs or sample data.