web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate issues ...
Power Automate
Unanswered

Power Automate issues "reading" JSON date/time

(0) ShareShare
ReportReport
Posted on by 13

Hello!

 

I am currently building a flow that will make a calendar event (Create a SharePoint item) which is triggered from receiving an email with important text information inside it. The important info in the email is the Title, Date/time, and Description of event. I will use this to create a calendar event for "Vacation time". Appreciate any feedback/advice/critics in advance, thanks!

 

The email looks like this...

"John Smith has submitted the following time off request which has been",
"auto-approved.",
"Reason: Flex Vacation",
"Time away net hours: 40",
"Time away start: 8/29/2022 12:00:00 AM",
"Time away end: 9/3/2022 12:00:00 AM",
"Time off employee message: See ya next week"

 

The current issue I'm having is the "Create an item" in SharePoint cannot read the information going into it. It gives an error of..."The 'inputs.parameters' of workflow operation 'Create_Calendar_Event' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/EventDate' is required to be of type 'String/date-time'. The source type/format 'Array' of the value '["2022-08-29T00:00:00.0000000"]' is not convertible to type/format 'String/date-time'."

 

Here are some screenshots of my current flow giving me this error...

Slock_0-1660335896692.png

 

Slock_1-1660335984078.png

Slock_2-1660336136612.png

 

 

 

 

 

 

Categories:
I have the same question (0)
  • maxpower45255 Profile Picture
    223 on at

    @Slock 

    The error description is pointing to a data type conversion issue.  Whichever action you're reading the source information from, it's returning an array of dates instead of a string, thus the error. Take a look at the value of the date field. It shows the date inside "[ ]". That's the notation for an array.  

     

    I have found that Power Automate does an excellent job in providing the description of the errors. I sometimes have to read twice to figure out the cause. But the error description always turned out to be accurate. Hope this helps. 

    Good luck!

     Input parameter 'item/EventDate' is required to be of type 'String/date-time'. The source type/format 'Array' of the value '["2022-08-29T00:00:00.0000000"]' is not convertible to type/format 'String/date-time'." 

  • Slock Profile Picture
    13 on at

    @maxpower45255 

     

    Awesome, thank you! I believe I converted the variable back to a string using the String() command. But when I did this, it returned me an error saying the inputs were not valid JSON.

    Slock_2-1660661537847.png

     

     

    So then I attempted to turn all the inputs into JSON using the simple below manual format...

    {

     "a": "b"

    }

    Slock_3-1660661772711.png

     

    But got an "object" not converting to "string" error.

    Slock_4-1660661952514.png

     

     

     

    Lastly, when I tried to convert this format into JSON using the command in Power automate....it could not Parse due to the T as shown in this free online software... Also I read on other forums that the Date/time must be in the YYYY-MM-ddTAA:BB:CC.DDDDDDD format to be correctly used as the start/end date thus why I have been using this convention.

     

    Slock_1-1660659055283.png

     

    Thanks for the patience/help.

     

  • Verified answer
    Slock Profile Picture
    13 on at

    @maxpower45255 

     

    Figured the issue out! The inputs to creating a SharePoint calendar item need to be as this screenshot shows....

    Slock_1-1660748044873.png

     

    The inputs should NOT be in the format below

    Slock_2-1660748214611.png

     

     

    The last piece of the puzzle I was looking back and seeing the "API operation failure" error code. I didnt quit understand what this meant but happened upon a video showing sometimes flows wont work if the connections arent correct. Indeed, my connections were not correct! I was working on this flow with a coworker, and it was using his inbox/SharePoint. Therefore the connection needed to be going through his email. However, flow automatically assigned my email as the connector and thus the API failure.... The tricky part about this was when I remembered the API failure, I was receiving a 401 Error code and that was telling me "The response is not in JSON format". INSTEAD of the API failure appearing (shown below). Anyways, thank you for the help and I hope this is of help to any other users out there in need!

    Slock_3-1660748538897.png

     

     

     

     

  • maxpower45255 Profile Picture
    223 on at

    @Slock That's great! any time. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard