Is there a way

Is there a way to set up an automation to only run while in a certain mode?

I’m looking to set up when the system
Is set to “away” I would like the door sensors when set to open to start recording certain cameras.

The only options I see to run are 24/7 or on a scheduled time.