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

(0) ShareShare
ReportReport
Posted on by 28
I am trying to create a Flow that takes data from an MS Form submission and creates an item in a SharePoint list. The MS Form includes an upload image option.

The Flow works without the image part.

I tried following a few YouTube videos explaining how to use the Parse JSON action to extract the image data from the submitted form. The flow fails when trying to Parse with the error “the schema validation failed”.
I did notice that when I copy/paste the sample schema as shown in those videos that instead of seeing the full code the Parse action schema box condenses it to
 {
    "type": "string"
}
I do not know if this is what is supposed to happen or that it happens because of how I am pasting the data.
I feel pretty confident that I am copying the correct data point associated with the upload image question on the Form.
Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    Please share you JSON Schema and JSON Input.
    I will take a look.
     
  • Gyllentid Profile Picture
    894 on at
    Add the action Compose, add the data you want to select for the Parse Json action. Run the flow. Copy the data you get in the compose. Use the copied content when you add the Parse json action, it can create that from a sample.
  • ghswebmaster Profile Picture
    28 on at
    Thank you both for responding.
    I added a Compose and ran it. I copied the following to paste in the “use sample’ box on the Parse action
    "[{\"name\":\"paw no background_Sample.png\",\"link\":\"https://xxxxx-my.sharepoint.com/personal/xxxx_xxxxxx_net/Documents/Apps/Microsoft%20Forms/wills/Question/paw%20no%20background_Sample%20Lz.png\",\"id\":\"016TDMZRWQRCJRCNNCNRFIB5T2UJFY3WRK\",\"type\":null,\"size\":102176,\"referenceId\":\"016TDMZRR3OBYPKIEHMZBZN5IFZPW67XJV\",\"driveId\":\"b!JIckI1asUEOH96f_MO19B64HU01a83ZMgqAt4sOXuwD9V20IyonDRrZPHNd4iLMf\",\"status\":1,\"uploadSessionUrl\":null}]"
    Right after I added this, the schema box showed this
    {
        "type": "string"
    }
    When I tried the Flow again, I still get the “schema validation failed” message. When I look at the raw inputs it is identical to what I copied to the “sample schema”
     
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    Use this schema.
     
    ​​​​​​​
  • Suggested answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    Use this schema
     
     
     
    {
     
        "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"
     
            ]
     
        }
     
    }
  • ghswebmaster Profile Picture
    28 on at
    Sudeep,
    Thank you again for taking the time to respond. The validation still fails. The issue is what is being parsed. In both cases (my initial schema and your schema), the error is due to the input being in array format.
    {
        "errors": [
            {
                "message": "Invalid type. Expected Object but got Array.",
                "lineNumber": 0,
                "linePosition": 0,
                "path": "",
                "schemaId": "#",
                "errorType": "type",
                "childErrors": []
            }
        ]
    }


    I have tried using the Compose action to convert the array to a string, but either my configuration is wrong or what I am trying to do is not doable.
    string(outputs('Get_response_details')?['body/rf992efdfb62249acb47fe3bd3969914e'])
  • Verified answer
    ghswebmaster Profile Picture
    28 on at
    This video solved my issue
     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard