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

Custom connector works on test but not in flow

Hi 

I built a custom connector and it works fine if I test it. But if I use the connector in a flow, I get following error:

 

ResponseSwaggerSchemaValidationFailure. The API 'ke-20info-20logon-5f54cf10f525d2c798-5f611ea99021dca66f' returned an invalid response for workflow operation 'CreateDocument' of type 'OpenApiConnection'. Error details: 'The API operation 'CreateDocument' requires the property 'body/CreateDocumentResult/Properties/0/GlobalValues' to be of type 'String' but is of type 'Array'. 

 

Any idea what the problem can be?

Regards

 

1 ACCEPTED SOLUTION

Accepted Solutions
tho1971
Frequent Visitor

Hi, I could solve the problem. During import of the json response in custom connector, a json definition has created. The Swagger editor showed me the definition of the part which failed as follow:

 

=> GlobalValues: {type: string, description: GlobalValues]

 

I just changed it to 

=> GlobalValues: {type: array, items{}, description: GlobalValues]

and the custom connector works now also in flow.

 

regards

View solution in original post

2 REPLIES 2
tho1971
Frequent Visitor

Hi,

I think i found the problem, but I don't no how to solve it:

My json response expects following structure:

tho1971_0-1602494410410.png

 

But the response can contain also a null value instead of an array:

tho1971_1-1602494562759.png

 

How can I change my json to Handle array and null?

 

regards

tho1971
Frequent Visitor

Hi, I could solve the problem. During import of the json response in custom connector, a json definition has created. The Swagger editor showed me the definition of the part which failed as follow:

 

=> GlobalValues: {type: string, description: GlobalValues]

 

I just changed it to 

=> GlobalValues: {type: array, items{}, description: GlobalValues]

and the custom connector works now also in flow.

 

regards

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,142)