type.inbound
// office docx
and any(filter(attachments, .file_extension in $file_extensions_macros),
any(file.explode(.),
// that contain sharepoint file share email wording in images
strings.icontains(.scan.ocr.raw,
' invited you to edit',
'This invite will only work for you and people with existing access',
' use of Microsoft 365 and may contain content that is controlled by'
)
)
)
Playground
Test against your own EMLs or sample data.