This is a pattern that we use in a few places where we build a "rule" that controls a behavior. Some uses cases are filters, triggers, alerts, and rules for formatting.
It can get pretty complex so I'm not sure how far we want to go with the nesting but there's a pretty clear structure to these UIs such as [object] [operator] [value] with some logic structures for blocks of arguments.