Creating Appointment

Hi All
We are looking to create appointment for leave in Autotask from email generated in our 3rd Party HR Portal.
The format of the email is below.

Copy of booked holiday

A holiday request has been approved for Joe Blogs 

The details are shown below
Start date
End date
26/12/2023
26/12/2023 am

________________________________
Please do not respond to this email as the sender's address is not monitored.

I am not sure how:-
a.) extract the start and end dates from the email.
b.) what format on the startdatetime and enddatetime field in the Appointment API
Thank for you help in advance.

Hi @Richard

I hope you don’t mind, I re-formatted your post to make the email more clear.

There are a few ways you can extract the dates:

Assuming the Start Date is always on the 8th line of the email, and the format is DD/MM/YYYY, you can extract the start date with:

{{date (lines email.body 8 flags="t") from_format="d/m/Y" from_tz="UTC" to_tz="Autotask"}}

The End Date (if it’s always on the 9th line) will be similar:

{{date (lines email.body 9 flags="t") from_format="d/m/Y" from_tz="UTC" to_tz="Autotask"}}

Let me know how that works!

Hi @travis

Thank you, that works. How would I go about amending the time in the data variable to always be 08:30