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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Parse JSON error

(0) ShareShare
ReportReport
Posted on by 72

Hello,

I am trying to Parse JSON to get an outcome from the approval where to let pass it with or without comments, but getting an error "message" like: "Required properties are missing from object: comments.".

 

Here is the schema used:

{
"type": "array",
"items": {
"type": "object",
"properties": {
"responder": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"userPrincipalName": {
"type": "string"
}
}
},
"requestDate": {
"type": "string"
},
"responseDate": {
"type": "string"
},
"approverResponse": {
"type": "string"
},
"comments": {
"type": [
"string", "null"
]
}
},
"required": [
"responder",
"requestDate",
"responseDate",
"approverResponse",
"comments"
]
}
}

 

Please, help me to figure out what is wrong?!

 

Best regards,

Alexandra

Categories:
I have the same question (0)
  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @ArisTale ,

    are you using the "Approvals" connector? If yes, you should be able to grab the comments without parsing a JSON.

     

    Please let me know if the issue is fixed.

     

    If I have answered your question, please mark my post as Solved.

    If you like my response, please give it a Thumbs Up.

     

    I may not have all the answers, but I'm curious and passionate enough to keep looking for answers and to keep sharing them.

     

    My blog site about Power Automate: https://powerautomatejoy.com/

     

    BR,

    Marco

  • ArisTale Profile Picture
    72 on at

    Hello @MarconettiMarco ,

    I need to Parse JSON in my case and comments just a little piece of it. I am trying to find a solution for this part of the code which I shared here.  Do you know how to fix it?

     

    Do you have any link with an explanation for grabbing the comments in the Approvals? Curious now.

     

    Best regards,

    Alexandra

  • Verified answer
    okeks Profile Picture
    802 Super User 2024 Season 1 on at

    It seems that in some cases your input doesn't have data for some fields. E.g. in one of your inputs may be no comment.

     

    In this case you need to remove this property from the required section and take care in the following actions that this field could be null.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @ArisTale ,

     

    As far as @okeks said, please remove the parts I marked and try again. If it works please consider mark @okeks 's solution as a 'solution' to help others.

     

    vbofengmsft_0-1661915738470.png

     

    Best Regards,

    Bof

     

  • ThamiMtombeni Profile Picture
    71 on at

    Hi @ArisTale ,

     

    Delete/remove all the required properties from your schema.

    ThamiMtombeni_0-1661938600878.png

    If I solved your issue ,please mark it as solution

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard