Combining ANDs and ORs in one event trigger filter

Is it possible to combine multiple AND and OR statements in an event trigger filter? During a Source Account Create trigger, I only want it to trigger for a specific source and when the identity’s email address matches 1 of 3 possible domains. Here’s an example, although it doesn’t work:

$[?($.sourceId == "2c9180867efe4965017efea86da10879" && ($.attributes.email contains "@domain1.com" || $.attributes.email contains "@domain2.com" || $.attributes.email contains "@domain3.com"))]

Thanks!

Daniel

This filter works when I test it on an ETS subscription. Have you tried testing this directly in the event trigger page, or just in workflows?

I tried creating a new subscription and was expecting it to give me an error if the filter was wrong, per the documentation, but it doesn’t. It accepts jibberish and will save without error.

I tested in a workflow and the workflow never triggered.

Here are my trigger subscription details, which worked for me. Do you see anything you might have done differently?

The filter is:

$[?($.sourceId == "jlasdferquwoep452343214v" && ($.attributes.email contains "@gmail.com" || $.attributes.email contains "@yahoo.com" || $.attributes.email contains "@protonmail.com"))]

After sending test subscription:

I receive the event.