You could do something like:
IF window open and Nest temperature > 50F (or some "critical" temperature to make sure your house does not freeze anyways) THEN Nest off
You might also want to have some sort of warning light that would come on. That could also be used to notify you. To do this you could add to the THEN portion...
and Warning Light On.
Then in the app have a notification set for the warning light go notify you when it changes.