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 / Custo connector into f...
Power Automate
Answered

Custo connector into flows - body property to be of type 'object' but is of type 'string'

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I created a Custom Connector using the Facebook Graph API with endpoint GET /me/accounts. The endpoint works perfectly and outputs properly in the Test page of the Custom Connector. Other endpoints work in Flows, so it is not a Facebook connection issue. I am attempting to use this operation in Flows, but I continue to get this error:

 

The API 'facebook-xx' returned an invalid response for workflow operation 'GetPages' of type 'OpenApiConnection'. Error details: 'The API operation 'GetPages' requires the property 'body' to be of type 'Object' but is of type 'String'.' 

 

This error also occurs on other operations which have JSON response objects with arrays or more complexity. The endpoint GET /me?fields=name works properly as the JSON object output is simply:

{"name":"**"}

 

However, the JSON output object of this particular operand should be:

{
"data": [
{
"access_token":"xx",
"category": "xx",
"category_list": [
{
"id": "xx",
"name": "xx"
},
{
"id": "xx",
"name": "xx"
},
{
"id": "xx",
"name": "xx"
}
],
"name": "xx",
"id": "xx",
"tasks": [
"xx",
"xx"
]
}
]

I feel like it has to do with the fact that 'body' is of type array. I have tried changing the type of property 'body' to array on Swagger editor on the custom connector. Then object, then string, but none of those worked. I added the response schema as an example on the definitions page. I am at a bit of a loss and anything would help!! Cheers 🙂

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @Anonymous 

     

    Just an observation, but you are missing a closing } ?

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi - just a copy and paste mistake..

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I fixed it by setting my response in the swagger file to:

    responses:
    default:
    description: default
    schema:
    type: string
    properties: {}

     

    I then have to parse the JSON using the "Parse JSON" block in Flow. A bit more annoying but it works.

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard