web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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)
  • Verified answer
    Community Power Platform Member Profile Picture
    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.

  • Community Power Platform Member Profile Picture
    on at

    Hi - just a copy and paste mistake..

  • 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 😉

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 190 Super User 2025 Season 2

Last 30 days Overall leaderboard