Flow save failing on popular template due to obscure date format issue

%3CLINGO-SUB%20id%3D%22lingo-sub-1035316%22%20slang%3D%22en-US%22%3EFlow%20save%20failing%20on%20popular%20template%20due%20to%20obscure%20date%20format%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1035316%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20using%20%3CA%20href%3D%22https%3A%2F%2Fus.flow.microsoft.com%2Fen-us%2Fgalleries%2Fpublic%2Ftemplates%2F0bc115a00d6911e78c2e9d11ef1d0c12%2Fcopy-specific-category-of-appointments-from-office-365-to-google-calendar%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20template%3C%2FA%3E%20I'm%20getting%20this%20error%20merely%20by%20saving%2C%20without%20making%20anything%20but%20necessary%20changes%20(i.e.%20Calendar%20IDs)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EFlow%20save%20failed%20with%20code%20'OpenApiOperationParameterValidationFailed'%20and%20message%20'Input%20parameter%20'newEvent'%20validation%20failed%20in%20workflow%20operation%20'Create_an_event'%3A%20The%20parameter%20with%20value%20'%22%40triggerOutputs()%3F%5B'body%2FStart'%5D%22'%20in%20path%20'newEvent%2Fstart'%20with%20type%2Fformat%20'String%2Fdate-no-tz'%20is%20not%20convertible%20to%20type%2Fformat%20'String%2Fdate-time'.'.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20ties%20to%20%3CSTRONG%3Ebody%2FStart%3C%2FSTRONG%3E%2C%20which%20in%20code%20form%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EtriggerOutputs()%3F%5B'body%2FStart'%5D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20wrong%20with%20that%3F%26nbsp%3B%20I%20saw%20one%20post%20recommending%20replacing%20it%20with%20this%20(as%20well%20as%20the%20body%2Fend%20version%20for%20End%20time)%2C%20which%20a)%20Shouldn't%20be%20necessary%20to%20do%20for%20a%20popular%20template%20from%20MS%2C%20and%20b)%20Translates%20the%20items%20into%20UTC%2C%20which%20is%20unwanted.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EconvertToUtc(triggerOutputs()%3F%5B'body%2Fstart'%5D%2C%20'Eastern%20Standard%20Time')%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20realize%20eventually%20that%20you%20can%20get%20around%20the%20UTC%20problem%20by%20using%20this%20(again%2C%20and%20the%20corresponding%20body%2Fend%20one%20for%20End%20time)%2C%20but%20it's%20pretty%20stupid%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EconvertToUtc(triggerOutputs()%3F%5B'body%2Fstart'%5D%2C%20'GMT%20Standard%20Time')%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1035316%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1066336%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20save%20failing%20on%20popular%20template%20due%20to%20obscure%20date%20format%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1066336%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20taking%20the%20time%20to%20post%20this.%26nbsp%3B%20The%20Office%20365%20to%20Google%20Calendar%20flow%20is%20very%20badly%20broken.%26nbsp%3B%20Microsoft%20have%20removed%20all%20the%20previously%20supported%20and%20working%20Google%20sync%2C%20and%20the%20one%20they%20added%20back%20requires%20this%20fix.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20job%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1609644%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20save%20failing%20on%20popular%20template%20due%20to%20obscure%20date%20format%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1609644%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F314%22%20target%3D%22_blank%22%3E%40Brian%20.%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20worked%20to%20preserve%20the%20correct%20time%20for%20me.%20But%20I%20wonder%2C%20will%20I%20need%20to%20change%20it%20when%20DST%20comes%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EconvertFromUtc(convertToUtc(triggerOutputs()%3F%5B'body%2Fstart'%5D%2C%20'Central%20Standard%20Time')%2C%20'Central%20Standard%20Time')%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1938081%22%20slang%3D%22en-US%22%3ERe%3A%20Flow%20save%20failing%20on%20popular%20template%20due%20to%20obscure%20date%20format%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1938081%22%20slang%3D%22en-US%22%3E%3CP%3EAny%20advice%20will%20be%20appreciate%20with%20my%20similar%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(a)%20Using%20Dynamic%20Content%20%22Event%20Start%20Date%20Time%22%3C%2FP%3E%3CP%3E%3CSPAN%3EFlow%20save%20failed%20with%20code%20'OpenApiOperationParameterValidationFailed'%20and%20message%20'Input%20parameter%20'item'%20validation%20failed%20in%20workflow%20operation%20'Create_a_Teams_meeting'%3A%20The%20parameter%20with%20value%20'%22%40triggerOutputs()%3F%5B'body%2Fstart'%5D%22'%20in%20path%20'item%2Fstart%2FdateTime'%20with%20type%2Fformat%20'String%2Fdate-time'%20is%20not%20convertible%20to%20type%2Fformat%20'String%2Fdate-no-tz'.'.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(b)%26nbsp%3B%20Expression1%20convertToUtc(triggerOutputs()%3F%5B'body%2Fstart'%5D%2C%20'GMT%20Standard%20Time')%3C%2FP%3E%3CP%3E%3CSTRONG%3EInvalidTemplate%3C%2FSTRONG%3E%3CSPAN%3E.%26nbsp%3BUnable%20to%20process%20template%20language%20expressions%20in%20action%20'Create_a_Teams_meeting'%20inputs%20at%20line%20'1'%20and%20column%20'22105'%3A%20'The%20template%20language%20function%20'convertToUtc'%20expects%20its%20second%20parameter%20to%20be%20a%20time%20zone%20matching%20the%20time%20zone%20indicated%20by%20the%20timestamp.%20The%20provided%20value%20'(UTC%2B00%3A00)%20Dublin%2C%20Edinburgh%2C%20Lisbon%2C%20London'%20is%20not%20valid%20or%20does%20not%20match%20the%20timestamp%20'2020-11-30T14%3A00%3A00.0000000Z'.%20Please%20see%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Flogicexpressions%23ConvertToUtc%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Flogicexpressions%23ConvertToUtc%3C%2FA%3E%20for%20usage%20details.'.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

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')

 

3 Replies

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 :)

 

@Brian . 

 

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')

 

 

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.'.