cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krobertson7153
Frequent Visitor

Error in Power Automate Flow When Using Custom Connector -requires the property 'body' to be of type 'String' but is of type 'Object'

I have created a Custom Connector that has a single "GetIssues" action.  The action tests fine within the Custom Connector creator.

 

When I try to use the action in a very simple flow I get the following error: 

 

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

 

The swagger for the custom connector looks like this:

NOTE:  I also tried with produces set to 'application/json', but I got the same error.

 

swagger: '2.0'
info: {version: 1.0.0, title: Optics JIRA, description: 'An API to connect to Optics
    JIRA, providing the ability to a list of issues returned by a given filter.'}
host: xxx-jira.xxx.com
basePath: /
schemes: [https]
consumes: []
produces: [text/plain]
    paths:
        /rest/api/2/search:
    get:
        summary: GetIssues
        description: Get JIRA Issues with a specific JQL
        operationId: GetIssues
        parameters:
            - {name: jql, default: project=PSSTOOLS, in: query, type: string, required: true,
                description: The JQL string to search for the issues you want to get}
        responses:
            '200':
                description: '200'
                schema: {type: string}
definitions: {}
parameters: {}
responses: {}
securityDefinitions:
basic_auth: {type: basic}
security:
    - basic_auth: []
tags: []

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for getting back to me.  I finally got it to work.  I think what finally worked was putting {} into my "body" in my postman definition which I uploaded to create the connector.  I think if I left it blank it treated it as "null" which is an object?  Not sure though, but it is working now.

 

This action did not require a body but I guess it is necessary to pass an empty body anyway.

View solution in original post

2 REPLIES 2
abm
Super User III
Super User III

Hi @krobertson7153 

 

Do you still need help in this?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Thanks for getting back to me.  I finally got it to work.  I think what finally worked was putting {} into my "body" in my postman definition which I uploaded to create the connector.  I think if I left it blank it treated it as "null" which is an object?  Not sure though, but it is working now.

 

This action did not require a body but I guess it is necessary to pass an empty body anyway.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (71,537)