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 🙂