SOLVED

Updating Classic Calendar with Flow error

%3CLINGO-SUB%20id%3D%22lingo-sub-1119838%22%20slang%3D%22en-US%22%3EUpdating%20Classic%20Calendar%20with%20Flow%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119838%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20PowerApps%20canvas%20app%20that%20collections%20information%20for%20company%20holidays.%26nbsp%3B%26nbsp%3B%20I%20am%20trying%20to%20extend%20it's%20value%20by%20adding%20a%20flow%20to%20take%20the%20information%20and%20create%20an%20event%20in%20a%20SharePoint%20classic%20calendar.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20flow%20is%20necessary%20to%20update%20the%20'All%20Day%20Event'%20flag.%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20flow%20is%20triggered%20from%20PowerApps%20and%20loops%20through%20the%20collection%20of%20holiday%20information%20and%20creates%20the%20events.%26nbsp%3B%20The%20event%20is%20successfully%20with%20the%20create%20item%20step%20and%20there%20are%20no%20errors%20in%20the%20date%2Ftime.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20comes%20in%20on%20the%20'Send%20an%20HTTP%20request%20to%20SharePoint.%26nbsp%3B%20I%20am%20getting%20an%20error%20that%20'%3CSTRONG%3EA'%20%3C%2FSTRONG%3EDate%2FTime%20value%20is%20invalid.%26nbsp%3B%20Doesn't%20tell%20me%20which%20one%20or%20what%20is%20wrong%20with%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESend%20HTTP%20Request%20configuration%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20600px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166270i191477AC8DF161DC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22SendHTTP.png%22%20title%3D%22SendHTTP.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22error%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22code%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E502%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22source%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22flow-apim-msmanaged-na-westus2-01.azure-apim.net%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22clientRequestId%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%225ec2029c-f09f-4aee-84aa-1a63018c237d%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22BadGateway%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22innerError%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22Invalid%20date%2Ftime%20value.%5Cn%5CnA%20date%2Ftime%20field%20contains%20invalid%20data.%20Please%20check%20the%20value%20and%20try%20again.%5Cr%5CnclientRequestId%3A%205ec2029c-f09f-4aee-84aa-1a63018c237d%5Cr%5CnserviceRequestId%3A%20a6592d9f-6035-a000-9fa2-c271745bb65f%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22status%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E502%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22source%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%3C%2FSPAN%3E%3CSPAN%3E%22%3CA%20href%3D%22https%3A%2F%2Fcommscope.sharepoint.com%2Fsites%2FARR_appdesign%2F_api%2Fweb%2Flists%2Fgetbytitle('Global%2520Holiday%2520Calendar')%2Fitems(10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fxxxxxxxxx.sharepoint.com%2Fsites%2FARR_appdesign%2F_api%2Fweb%2Flists%2Fgetbytitle('Global%2520Holiday%2520Calendar')%2Fitems(10%3C%2FA%3E)%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22errors%22%3C%2FSPAN%3E%3CSPAN%3E%3A%20%5B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22-2130575332%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%22Microsoft.SharePoint.SPException%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%5D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20how%20to%20figure%20out%20what%20is%20wrong%20with%20the%20date%2Ftime%20in%20the%20event%20and%20how%20to%20fix%20it%20so%20this%20will%20properly%20update.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20this%20thread%20for%20updating%20the%20All%20Day%20Event.%20%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FI-Found-A-Bug%2FAll-Day-Event-in-a-SharePoint-Calendar-is-not-recognized-as-a%2Ftd-p%2F278310%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpowerusers.microsoft.com%2Ft5%2FI-Found-A-Bug%2FAll-Day-Event-in-a-SharePoint-Calendar-is-not-reco...%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5149%22%20target%3D%22_blank%22%3E%40Terry%20McCullagh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1119838%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1119957%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20Classic%20Calendar%20with%20Flow%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1119957%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F395352%22%20target%3D%22_blank%22%3E%40BejeweledOne%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20the%20problem%20is%20you%20need%20to%20include%20the%20start%20and%20end%20date%2Ftimes%20in%20the%20body%20of%20your%20http%20request.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20take%20a%20look%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.anupams.net%2Fsend-meeting-invites-sharepoint-online-calendar%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.anupams.net%2Fsend-meeting-invites-sharepoint-online-calendar%2F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1123606%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20Classic%20Calendar%20with%20Flow%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1123606%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5149%22%20target%3D%22_blank%22%3E%40Terry%20McCullagh%3C%2FA%3EI%20was%20able%20to%20get%20it%20working.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20I%20added%20the%20part%20to%20update%20the%20Start%20and%20End%20times%2C%20I%20was%20getting%20other%20errors.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20resolve%20it%20by%20passing%202%20dates%20from%20the%20PowerApp%20to%20the%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDate%20%231%20is%20the%20standard%20DatePicker%20value%20for%20use%20in%20the%20Create%20Item%20action.%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Date%20%232%20is%20a%20specially%20formatted%20date%20that%20is%20used%20in%20the%20Send%20HTTP%20Request%20action.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20had%20to%20format%20date%20%232%20in%20PowerApps%20like%20this%3A%26nbsp%3B%26nbsp%3B%20%7BEventDate%3A%20Text(dpDate.SelectedDate%2C%22%5B%24-en-US%5Dyyyy-mm-ddThh%3Amm%3Ass%22)%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20resolved%20it.%26nbsp%3B%26nbsp%3B%20Thank%26nbsp%3B%20you%20for%20pointing%20me%20in%20the%20right%20direction.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1120755%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20Classic%20Calendar%20with%20Flow%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1120755%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5149%22%20target%3D%22_blank%22%3E%40Terry%20McCullagh%3C%2FA%3EThat%20certainly%20seems%20to%20be%20the%20case.%26nbsp%3B%26nbsp%3B%20I%20hate%20to%20be%20the%20noob%2C%20but%20in%20this%20case%20I%20am.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20having%20an%20issue%20with%20formatting%20the%20date%20in%20the%20HTTP%20action.%26nbsp%3B%26nbsp%3B%20I%20presume%20I%20need%20to%20use%20the%20Start%20and%20End%20date%20from%20the%20newly%20created%20item%2C%20but%20can't%20seem%20to%20get%20the%20formatting%20correct.%26nbsp%3B%26nbsp%3B%20It's%20the%20first%20time%20I%20have%20tried%20used%20the%20expression%20builder%20to%20format%20it%20and%20what%20I%20have%20now%20is%20giving%20me%20the%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20484px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166328iF0AE5AB4EB8D85BA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22formatdate.png%22%20title%3D%22formatdate.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20may%20break%20your%20PowerApps%20triggered%20flow%20with%20the%20changes%20on%20the%20triggers.%26nbsp%3B%20I%20*think*%20I%20can%20safely%20say%20that%20it's%20referring%20to%20the%20triggerBody%20part%20of%20the%20statement%2C%20but%20I%20am%20not%20really%20sure%20how%20to%20fix%20that..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I have a PowerApps canvas app that collections information for company holidays.   I am trying to extend it's value by adding a flow to take the information and create an event in a SharePoint classic calendar.

 

The flow is necessary to update the 'All Day Event' flag.   

 

The flow is triggered from PowerApps and loops through the collection of holiday information and creates the events.  The event is successfully with the create item step and there are no errors in the date/time.

 

The problem comes in on the 'Send an HTTP request to SharePoint.  I am getting an error that 'A' Date/Time value is invalid.  Doesn't tell me which one or what is wrong with it.

 

Send HTTP Request configuration:

SendHTTP.png

 

Error:

{
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-westus2-01.azure-apim.net",
"clientRequestId": "5ec2029c-f09f-4aee-84aa-1a63018c237d",
"message": "BadGateway",
"innerError": {
"message": "Invalid date/time value.\n\nA date/time field contains invalid data. Please check the value and try again.\r\nclientRequestId: 5ec2029c-f09f-4aee-84aa-1a63018c237d\r\nserviceRequestId: a6592d9f-6035-a000-9fa2-c271745bb65f",
"status": 502,
"errors": [
"-2130575332",
"Microsoft.SharePoint.SPException"
]
}
}
}

 

I am not sure how to figure out what is wrong with the date/time in the event and how to fix it so this will properly update.

 

I am using this thread for updating the All Day Event.   https://powerusers.microsoft.com/t5/I-Found-A-Bug/All-Day-Event-in-a-SharePoint-Calendar-is-not-reco... 

 

@Terry McCullagh 

4 Replies
Highlighted
Best Response confirmed by BejeweledOne (Occasional Contributor)
Solution

@BejeweledOne 

 

I think the problem is you need to include the start and end date/times in the body of your http request.

 

Please take a look at https://www.anupams.net/send-meeting-invites-sharepoint-online-calendar/ 

 

Hope this helps. 

Highlighted

@Terry McCullaghThat certainly seems to be the case.   I hate to be the noob, but in this case I am.

 

I am having an issue with formatting the date in the HTTP action.   I presume I need to use the Start and End date from the newly created item, but can't seem to get the formatting correct.   It's the first time I have tried used the expression builder to format it and what I have now is giving me the error:

 

formatdate.png

 

You may break your PowerApps triggered flow with the changes on the triggers.  I *think* I can safely say that it's referring to the triggerBody part of the statement, but I am not really sure how to fix that..

 

 

 

 

Highlighted

@Terry McCullaghI was able to get it working.

 

After I added the part to update the Start and End times, I was getting other errors. 

 

I was able to resolve it by passing 2 dates from the PowerApp to the flow.

 

Date #1 is the standard DatePicker value for use in the Create Item action.    Date #2 is a specially formatted date that is used in the Send HTTP Request action.

 

I had to format date #2 in PowerApps like this:   {EventDate: Text(dpDate.SelectedDate,"[$-en-US]yyyy-mm-ddThh:mm:ss")}

 

That resolved it.   Thank  you for pointing me in the right direction.

Highlighted
You're welcome!