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 Platform Community / Forums / Power Automate / Power Automate Parse J...
Power Automate
Answered

Power Automate Parse JSON error. Invalid type. Expected Object but got Array

(0) ShareShare
ReportReport
Posted on by 546

Hi PA People,

 

I've been working on a flow from a test list which works fine, and now moving it into production, and I'm getting the error of "Invalid Type, Expected Object but got Array".

 

I always seem to trip over Parse JSON syntax.  The flow runs daily and goes a Get Items action with an oData filter of anniversary date = today.

smorley_0-1678450834128.png

Next I select the Department Administrator.

smorley_1-1678450880033.png

I then initialize my array variable with a union statement.

union(body('Select_Department_Administrator'), body('Select_Department_Administrator'))

smorley_2-1678450935226.png

Next my Parse JSON statement uses the array variable as the content.

smorley_4-1678451214284.png

 

The schema is below:

{
"type": "array",
"items": {
"type": "object",
"properties": {
"Claims": {
"type": ["string", "null"]
},
"DisplayName": {
"type": ["string", "null"]
},
"Email": {
"type": ["string", "null"]
},
"Picture": {
"type": ["string", "null"]
},
"Department": {
"type": ["string", "null"]
},
"JobTitle": {
"type": ["string", "null"]
},
"@odata.type": {
"type": ["string", "null"]
}
},
"required": [
"@odata.type",
"Claims",
"DisplayName",
"Email",
"Picture",
"Department",
"JobTitle"
]
}
}

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,543 Most Valuable Professional on at

    The schema you listed isn't the schema that is showing in the Parse JSON screenshot.  Check the schema and you should be fine.  The one you list starts 

     

    {
    "type": "array",
    "items": {

     

    But the one in the screenshot shows

     

    {
    "type": "object",
    "properties": {

     

  • smorley Profile Picture
    546 on at

    Well @Pstork1 I did make it work based on your post.  Thanks.  Here's the weird thing.  My test flow here's the output from the JSON action.  This is the one that works.

    smorley_0-1678452390225.png

    In the production flow, with the same syntax.  It fails.

    I swapped out "array" with "object" like you suggested, saved it, and ran it, and it now works fine.

    When I go look at it after I've saved, it looks like it did when it failed.

    smorley_1-1678452692409.png

    I'm glad you got it to work for me, but I'm a little mystified by it.

     

  • Pstork1 Profile Picture
    69,543 Most Valuable Professional on at

    Its not just the type array that is different in the production schema.  I would copy the whole schema from test, paste it into production and save it.  Then test production.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard