Forum Discussion
rpodric
Nov 27, 2019Bronze Contributor
Flow save failing on popular template due to obscure date format issue
In using this template I'm getting this error merely by saving, without making anything but necessary changes (i.e. Calendar IDs):
Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'newEvent' validation failed in workflow operation 'Create_an_event': The parameter with value '"@triggerOutputs()?['body/Start']"' in path 'newEvent/start' with type/format 'String/date-no-tz' is not convertible to type/format 'String/date-time'.'.
It ties to body/Start, which in code form is:
triggerOutputs()?['body/Start']
What is wrong with that? I saw one post recommending replacing it with this (as well as the body/end version for End time), which a) Shouldn't be necessary to do for a popular template from MS, and b) Translates the items into UTC, which is unwanted.
convertToUtc(triggerOutputs()?['body/start'], 'Eastern Standard Time')
I did realize eventually that you can get around the UTC problem by using this (again, and the corresponding body/end one for End time), but it's pretty stupid:
convertToUtc(triggerOutputs()?['body/start'], 'GMT Standard Time')
- Harold_FinckerCopper Contributor
You can now use "start time with time zone" and "end time with time zone" to avoid the problem in the dynamic parameters
- DrHans1844Copper Contributor
This worked to preserve the correct time for me. But I wonder, will I need to change it when DST comes?
convertFromUtc(convertToUtc(triggerOutputs()?['body/start'], 'Central Standard Time'), 'Central Standard Time')
- SamTechCopper Contributor
Any advice will be appreciate with my similar error:
(a) Using Dynamic Content "Event Start Date Time"
Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'item' validation failed in workflow operation 'Create_a_Teams_meeting': The parameter with value '"@triggerOutputs()?['body/start']"' in path 'item/start/dateTime' with type/format 'String/date-time' is not convertible to type/format 'String/date-no-tz'.'.
(b) Expression1 convertToUtc(triggerOutputs()?['body/start'], 'GMT Standard Time')
InvalidTemplate. Unable to process template language expressions in action 'Create_a_Teams_meeting' inputs at line '1' and column '22105': 'The template language function 'convertToUtc' expects its second parameter to be a time zone matching the time zone indicated by the timestamp. The provided value '(UTC+00:00) Dublin, Edinburgh, Lisbon, London' is not valid or does not match the timestamp '2020-11-30T14:00:00.0000000Z'. Please see https://aka.ms/logicexpressions#ConvertToUtc for usage details.'.
- MrNickIron Contributor
Thanks for taking the time to post this. The Office 365 to Google Calendar flow is very badly broken. Microsoft have removed all the previously supported and working Google sync, and the one they added back requires this fix.
Good job 🙂