Skip to main content
Community site session details

Community site session details

Session Id : d1tSjz1RkkKf/M3A8adgf8
Power Automate - Building Flows
Unanswered

Parse Json Error

Like (0) ShareShare
ReportReport
Posted on 16 Dec 2021 15:08:04 by 34

I have the following error in a flow. My second attachment isn’t mandatory  so when users keeps it empty I am getting this error. Anyone can help me solving this?

My schema is as following:

{

    "type": "array",

    "items": {

        "type": "object",

        "properties": {

            "name": {

                "type": "string"

            },

            "link": {

                "type": "string"

            },

            "id": {

                "type": "string"

            },

            "type": {},

            "size": {

                "type": "integer"

            },

            "referenceId": {

                "type": "string"

            },

            "driveId": {

                "type": "string"

            },

            "status": {

                "type": "integer"

            },

            "uploadSessionUrl": {}

        },

        "required": [

            "name",

            "link",

            "id",

            "type",

            "size",

            "referenceId",

            "driveId",

            "status",

            "uploadSessionUrl"

        ]

    }

}

Capture.PNGCapture1.PNGCapture2.PNG

  • roymaalouf Profile Picture
    34 on 28 Feb 2022 at 09:44:45
    Re: Parse Json Error

    Dear @ManishJain ,

     

    I didn't get the first sentence, what do you mean by do compose of attachments variable as well and provide that?

    Just want to ask you if any availability to schedule a ms teams call and help me with it?

  • MJain Profile Picture
    2,450 on 24 Feb 2022 at 13:28:22
    Re: Parse Json Error

    Hi @roymaalouf ,

    Please do compose of Attachments variable as well and provide that . I think you are using Attachments array as input for Apply to each and same variable in Condition as per screenshot. Check for Current Item to be null or non null . 

     

    Thanks

  • roymaalouf Profile Picture
    34 on 24 Feb 2022 at 07:22:28
    Re: Parse Json Error

    Flow 1.PNGFlow 2.PNGFlow 3.PNG

     

    Parse schema is as following:

     

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "name": {
                    "type""string"
                },
                "link": {
                    "type""string"
                },
                "id": {
                    "type""string"
                },
                "type": {},
                "size": {
                    "type""integer"
                },
                "referenceId": {
                    "type""string"
                },
                "driveId": {
                    "type""string"
                },
                "status": {
                    "type""integer"
                },
                "content": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "uploadSessionUrl": {}
            },
            "required": [
                "name",
                "link",
                "id",
                "type",
                "size",
                "referenceId",
                "driveId",
                "status",
                "uploadSessionUrl"
            ]
        }
    }
  • MJain Profile Picture
    2,450 on 21 Feb 2022 at 14:44:37
    Re: Parse Json Error

    Hi @roymaalouf ,

     

    Please share your flow screenshot and Parse JSON schema to look at. 

     

    Thanks

  • roymaalouf Profile Picture
    34 on 21 Feb 2022 at 13:49:38
    Re: Parse Json Error
    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "name": {
                    "type""string"
                },
                "link": {
                    "type""string"
                },
                "id": {
                    "type""string"
                },
                "type": {},
                "size": {
                    "type""integer"
                },
                "referenceId": {
                    "type""string"
                },
                "driveId": {
                    "type""string"
                },
                "status": {
                    "type""integer"
                },
            
        "content": {
            "type": [
                "string",
                "null"
            ]
        },
                "uploadSessionUrl": {}
            },
            "required": [
                "name",
                "link",
                "id",
                "type",
                "size",
                "referenceId",
                "driveId",
                "status",
                "uploadSessionUrl"
            ]
        }
    }
     
    I updated my parse json to this and still getting the same error
  • MJain Profile Picture
    2,450 on 17 Feb 2022 at 14:06:09
    Re: Parse Json Error

    looks like you have not shared the entire json which contains 'content' and what you need to do to overcome null thing is define like this 

     

     "content": {

                    "type": ["string","null"]

                }

     

    Thanks

  • roymaalouf Profile Picture
    34 on 17 Feb 2022 at 10:50:27
    Re: Parse Json Error

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

     

    This is the error!

    I can't put id or driveid in condition since i created get file content after the condition! so they will not appear in condition entries! Please i need to solve this

  • MJain Profile Picture
    2,450 on 15 Feb 2022 at 15:53:17
    Re: Parse Json Error

    Hi @roymaalouf ,

    If I get it right your current item is not null but driveid or id is null as a result when you try to get content from sharepoint it fails. Please check your data what is coming as null and put that in the condition.

     

    Thanks

  • roymaalouf Profile Picture
    34 on 15 Feb 2022 at 14:47:00
    Re: Parse Json Error

    null.PNG

     

    Sorry for bothering you! I am using the following expression:

     

    Current item is equal to null

     

    any recommendation?

  • MJain Profile Picture
    2,450 on 11 Feb 2022 at 21:34:52
    Re: Parse Json Error

    Hi @roymaalouf ,

     

    The condition that you are putting to check if the attachment is null is not right. that is why it is going inside that parse json route which is only for Valid attachment. Please check the expression you are using to check null attachment. 

     

    Thanks

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2