Template to Parse Text

I would like to use the imap_email_content and search within the body text for keywords/phrases to trigger automation.

So, for example, if the sensor.emails state is “09/14 9:00 AM Security System Disarmed by access code 20.”
I would like a trigger that acts when the words “System Disarmed” are found within the state.

How would that template be written?

Thanks

1 Like