Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Parse JSON Error

(0) ShareShare
ReportReport
Posted on by 2

Hi,

I am trying to run a flow to pick up form responses and also add the embedded attachment within the form into a SharePoint List.

 

I have added the PARSE JSON etc. and this works really well - apart from that the attachment isn't present on all branches of the form.  So the responses that do not contain an attachment are creating an error at the PARSE stage of the flow.

Capture.PNG

The error in this instance is:

Unable to process template language expressions in action 'Parse_JSON' inputs at line '1' and column '32007': 'Required property 'content' expects a value but got null. Path ''.'.

 

The flow is attached, and the schema within the PARSE action is:

{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "name": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "link": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "id": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "type": {},
            "size": {
                "type": [
                    "integer",
                    "null"
                ]
            },
            "referenceId": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "driveId": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "status": {
                "type": [
                    "integer",
                    "null"
                ]
            },
            "uploadSessionUrl": {}
        },
        "required": [
            "name",
            "link",
            "id",
            "type",
            "size",
            "referenceId",
            "driveId",
            "status",
            "uploadSessionUrl"
        ]
    }
}
 
The only way around it I can think of is to build in a condition at the beginning of the flow to make the different branches of the form follow different paths in the flow but this seems complicated.
 
Please advise!
D
  • Expiscornovus Profile Picture
    31,648 Most Valuable Professional on at
    Re: Parse JSON Error

    Hi @D110,

     

    I have a quick question. Are you allowed to make that attachment question required in the Microsoft Forms? That's potentially the easiest fix.

     

    Btw, I am assuming you are parsing the Question itself and not the whole body of the response, looking at your schema.

     

    Another option could be to use an expression to check if the response of the question is empty and use that in a condition. Replace the id with your question id btw.

     

     

    empty(outputs('Get_response_details')?['body/rb6300447760b4ab1b66fc97ef9017f2a'])

     

    isquestionempty02.png

     

  • Pstork1 Profile Picture
    66,030 Most Valuable Professional on at
    Re: Parse JSON Error

    Take a look at the following post.  ParseJSON action does not accept valid null value ... - Power Platform Community (microsoft.com)

    The problem is that the ParseJSON action builds a default schema that expects every property to have a value.  You can modify the schema so the properties can either have a value or be null.  That will remove the error.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow