Hi All,
I am new to making flows and I'm having trouble with linking a date into a Calander appointment.
What I am doing is when an email arrives, the flow will convert html to text and then I filter the body of the email to get the date/time from it. This part works correctly. See below.
Email:

Filter: substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'Work Start:'), 12),19)
Output:

The next part is where I am having issues. I take the output of the filter and add it to the Calander appointment and then get this error: "String was not recognized as a valid DateTime. clientRequestId: 6db99979-f1da-4abd-8733-c098b87e6288"
I then tried to use formatDateTime to change the output into ISO 8601 format and then take that output and put it into the Calander appointment, but I then get the below error when it attempts the formatDateTime.
Expression: formatDateTime(outputs('Work_Start'), 'yyyy/MM/dd hh:mm tt')
Error: Unable to process template language expressions in action 'Work_Start_Reformat' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '18/05/2023 06:00 AM' was not valid. The datetime string must match ISO 8601 format.'.
In the error I can see that is has taken the correct time from the Work Start step. I have been looking around and haven't been able to find how to fix this.
I am hoping someone will be able to point out what i am missing to make this work.
(I will need to do the same thing for Work End but i will hold off doing that till I get Work Start working)
Below is screenshot of the flow.
