type.inbound
and any(attachments,
not (
.file_type == "ics"
or .file_extension == "ics"
or .content_type in ("application/ics", "text/calendar")
)
and any(file.explode(.),
any(.scan.url.urls,
.domain.sld == "google"
and strings.istarts_with(.path, '/share.google')
and 'q' in keys(.query_params_decoded)
)
)
)
Playground
Test against your own EMLs or sample data.