Skip to main content

Notifications

Power Automate - Connector Development
Unanswered

API returns text/json

(0) ShareShare
ReportReport
Posted on by 14

Hi all,

 

I am trying to implement a third party API as a custom connector. 

I can not edit anything about the API, I can only work with it.

 

The problem is that in a flow I always get the error "The API operation 'ProjectGetAllMin' requires the property 'body' to be of type 'Object' but is of type 'String'." 

The response is definitely a JSON object, but the API returns the Conte-Type text/json in the header. I think that may be the problem? 

 

When I test the actions in the custom connector editor, it works fine.

 

As I said, it is a third-party API and I can not change what it is returning. Can I maybe force the flow to interpret the data as JSON anyway?

 

Thanks,

Bjarne

 

Edit:

Just to make sure, here is a example response:

 

{
 "response": {
 "status": 200,
 "version": "4.0",
 "message": "ok",
 "note": null,
 "note_type": null
 },
 "data": [
 {
 "name": "123456 - Test",
 "notes": "A note",
 "is_archived": false,
 "delivery_date": null,
 "estimated_time": 0.0,
 "accumulated_time": 3600,
 "worked_hours": 1.0,
 "color": "5",
 "is_public": null,
 "default_view": null,
 "customer": {
 "name": "Customer",
 "id": 412340
 },
 "service": {
 "name": "Customers",
 "id": 147624
 },
 "created_at": "2021-09-10 06:06:06",
 "updated_at": "2021-09-10 08:37:41",
 "following": false,
 "active_tasks": 1,
 "archived_tasks": 0,
 "is_template": false,
 "billing_data": {
 "hourly_rate": null,
 "fixed_rate": null
 },
 "billing": {
 "hourly_rate": null,
 "fixed_rate": null
 },
 "id": 1442292
 }
		]
}

 

  • ThomasDK Profile Picture
    ThomasDK 265 on at
    Re: API returns text/json

    Hej Bjarne,

     

    Did you ever get this to work? I have the exact opporsite problem and I'm not getting much (as in none) response either.

    My post: Re: The API operation 'CreateTeam' requires the pr... - Power Platform Community (microsoft.com)

     

    /Thomas

  • BKohnke Profile Picture
    BKohnke 14 on at
    Re: API returns text/json

    Sure.

    I played around with the action definition in OpenAPI view, but I couldn't get it to work...

     

    When I use an action that creates something, for example, create a new project, I get the same error, but I can see in the App that the creation worked. 

     

    BKohnke_0-1631433935500.png

     

  • Mira Ghaly Profile Picture
    Mira Ghaly 11,409 on at
    Re: API returns text/json

    @BKohnke 

    can you share screen where exactly your flow is failing?

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics