Host Maintenance With Start Time and End Time

Additional information: v1.6.0p16…One of our enterprise solutions requires a start time and end time to put a device in maintenance mode. I am trying to automate it whereas an email will contain the maintenance start time and end time for a device, and process into and feed where it needs to go.

Right now, how the maintenance works it emails the start time and when the maintenance window finishes, the end time maintenance for the device (or cancelled maintenance) on a separate email. This won’t work for us.

Is there a way to accomplish the above?
Thanks,