Updating Classic Calendar with Flow error

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




"error": {
"code": 502,
"source": "",
"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": [


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. 


@Terry McCullagh 

4 Replies
best response confirmed by BejeweledOne (Brass Contributor)



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 


Hope this helps. 

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




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





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

You're welcome!