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

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

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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,912)