type.inbound
and regex.contains(sender.display_name, '\(Google (Slides|Docs)')
and any(body.links,
.href_url.domain.domain == "script.google.com"
and strings.ilike(.href_url.path, "/macros*")
)
and 1 of (
strings.ilike(body.plain.raw, '*you have ? hours*'),
strings.ilike(body.plain.raw, '*transfer of funds*'),
strings.ilike(body.plain.raw, '*order your funds*')
// Or the Sender Display Name is not in your Org Display Names
or not any($org_display_names,
strings.istarts_with(sender.display_name,
strings.concat(., " (Google ")
)
)
)
Playground
Test against your own EMLs or sample data.