Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Action 'Parse_JSON' failed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

It says SCHEMA VALIDATION FAILED.

Sathyashree_0-1663065670284.png


I have used the following query:

Content:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Region": {
"type": ["string", "null"]
},
"Retailer": {
"type": ["string", "null"]
},
"Global Location ID": {
"type": ["string", "null"]
},
"Total Revenue": {
"type": ["number", "string", "null"]
}
}
}
}

 

Schema:

{
  "type""array",
  "items": {
    "type""object",
    "properties": {
      "Region": {
        "type": [
          "string",
          "null"
        ]
      },
      "Retailer": {
        "type": [
          "string",
          "null"
        ]
      },
      "Global Location ID": {
        "type": [
          "string",
          "null"
        ]
      },
      "Total Revenue": {
        "type": [
          "string",
          "number",
          "null"
        ]
      }
    }
  }
}
 
I'm getting the error that Action 'Parse_JSON' failed and displays this error in the output:
[
  {
    "message""Invalid type. Expected Array but got Object.",
    "lineNumber"0,
    "linePosition"0,
    "path""",
    "schemaId""#",
    "errorType""type",
    "childErrors": []
  }
]
  • Muralidharan Profile Picture
    340 on at
    Re: Action 'Parse_JSON' failed

    @Sathyashree 

    Can you please confirm what are the columns are available in Collection_Show_Data collection ?


    Thanks,

    Murali

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Sathyashree Profile Picture
    Microsoft Employee on at
    Re: Action 'Parse_JSON' failed

    Hi Sir,

    @muralidharan 

    TableName has multiple other columns apart from ID, Region, Retailer, among which Total Revenue is also one. I could pull that "Total Revenue" into the Gallery. 

    This is the formula I used to pull the data onto the gallery:
    Search
    (
    Filter
    (
    TableName,
    Region=ComboBox_Region.Selected.Result || IsBlank(ComboBox_Region.Selected.Result),
    Retailer=ComboBox_Retailer.Selected.Result || IsBlank(ComboBox_Retailer.Selected.Result)
    ),
    ABC_XYZ_Input.Text, "ABC_x0020_XYZ_x0020_ID"
    )

    It gets populated on my interface:

    Sathyashree_0-1663090344584.png


    But it DOESN'T get populated in my Excel that I had exported into OneDrive using the PowerFlow. Well, even the inputs to the PowerFlow has only three columns -> ID, Region and Retailer. It doesn't read any other columns from the TableName. I had pulled the data into a COLLECTION using the filter conditions to capture the subset of rows satisfying the filter conditions. But the COLLECTION data I had referenced to Parse the JSON captures only those filter columns, and NOT the rest of the columns apart from the filter columns, though the populated data satisfies the filter conditions.

    Summary: The COLLECTION returns the subset of rows by applying the filter conditions, and ONLY those data columns mentioned within the FILTERS gets populated when I filtered the data from the ComboBox used to interact with the User(Here : ID, Region, Retailer) from the main TableName. It doesn't return the rest of the columns(Total Revenue, etc).

  • Muralidharan Profile Picture
    340 on at
    Re: Action 'Parse_JSON' failed

    @Sathyashree 

    You're filtering records from TableName and this has only 3 columns, name, region and retailer? 

     

     

  • Sathyashree Profile Picture
    Microsoft Employee on at
    Re: Action 'Parse_JSON' failed

    @muralidharan 

    Hi Sir,

    Yes Sir, I'm connecting data directly from PowerApps. I have used this FORMULA on the "Export data" icon.

    ClearCollect
    (
    Collection_Show_Data,
    Search
    (
    Filter
    (
    TableName,
    Region=ComboBox_Region.Selected.Result || IsBlank(ComboBox_Region.Selected.Result),
    Retailer=ComboBox_Retailer.Selected.Result || IsBlank(ComboBox_Retailer.Selected.Result)
    ),
    ABC_XYZ_Input.Text, "ABC_x0020_XYZ_x0020_ID"
    )
    );

    Data_Export_Flow.Run
    (
    JSON
    (
    Collection_Show_Data,
    JSONFormat.IncludeBinaryData
    )
    )

    To which, Power flow ONLY collects those 3 columns mentioned within the filter[

    ABC_x0020_XYZ_x0020_IDRegionRetailer
    12345Region1Retailer1

     Whereas I want the "Total revenue" also

    TableName contains "Total Revenue" column, but I couldn't extract that column when I used the Collection to extract filtered data upon using the filters on the 3 columns -> [ABC_XYZ_ID, Region, Retailer].

    Sathyashree_0-1663089944742.png

     



  • Muralidharan Profile Picture
    340 on at
    Re: Action 'Parse_JSON' failed

    @Sathyashree 

    Are you sending the data from Power Apps to Power Automate for JSON parse?

    You can alter the JSON schema on the Parse JSON action, or you can use simply json () in the Power Automate expressions.

    Power Automate Fundamentals # 27: Usage of JSON Fu... - Power Platform Community (microsoft.com) 

     

    There is ParseJSON feature in Poer Apps but it is in experimental stage.  - ParseJSON function in Power Apps (experimental) - Power Platform | Microsoft Docs

     

  • Sathyashree Profile Picture
    Microsoft Employee on at
    Re: Action 'Parse_JSON' failed

    Hi Murali Sir,
    @muralidharan 

    I got the error rectified, but I only get 3 columns out of the 4 columns as of now. I want an additional column "Total Revenue" as well from the data. How should I go about it? 

    I mean, as I used ClearCollect to extract the data from the main table, it only extracts whatever columns I had mentioned inside the filter. What should I do to include the columns from the main table, apart from the columns I had used in the filter condition?

  • Muralidharan Profile Picture
    340 on at
    Re: Action 'Parse_JSON' failed

    @Sathyashree 

    How you generated the JSON schema ? 

    Have you tried "Generate from Sample" option in Parse JSON action ?

     

    muralidharan_0-1663087473170.png

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow