Custom Contact Sensor Alerts

It would be nice if we could set up custom alerts on things like contact sensors… like send an alert if a door is open for x amount of minutes.