
Hi all, I'm building a custom connector for Power Automate. I have a few Operations built so far. One operation fails with a "500 Internal Server Error" message when I add it to a flow, but works in the Custom Connector test page with the exact same input. How should I troubleshoot this?
One possible culprit is that this operation uses a query parameter (named "filters") with an array value, and I don't think I've set that up right. When I check the Swagger editor, there's a warning noting that the array doesn't have any sibling items, image attached.
Still, the "6. Test" page sends queries successfully and gets the correct response. An example value for filters is:
[{"email":{"option":"contains","value":"username@contoso.com"}}]
Unlike on the Test page, if I run a flow with this connector and operation, pasting the same value for filters, I get a 500 error.
I'm not Swagger-fluent, but I made some attempts to resolve the warning. If I try to describe the array items like this:
- name: filters
in: query
required: true
type: array
items:
type: object
properties:
email:
type: object
properties:
option:
type: string
value:
type: string
The editor shows two warnings, (1) indicating "items should NOT have additional properties" and (2) indicating "items.type should be an allowed value: string, number, integer, boolean, array".
If I try to describe an arbitrary array:
- name: filters
in: query
required: true
type: array
items: {}
I get an error when saving the connector: "items: The 'type' property is required."
Any tips on how to correctly setup this array-valued query parameter, or other places I can troubleshoot so that the connector works in a Flow (as it does on the Test page) much appreciated. As a stretch goal, I'd love for the connector to hide the filters parameter entirely, only prompting users for an email address, and have that fill in the correct part of a filters {{template}}, but I had no luck figuring that out.
[{"email":{"option":"contains","value":"{{email}}"}}]
Any general troubleshooting steps for custom connectors whose tests and actual usages don't return the same results? In my limited time I've seen this both ways: with actual usage working while tests fail (I noted this when trying some C# code, which I don't think the Test page implements), or as in this case, with the Test page succeeding and actual flows failing.
This is important functionality that should be fixed to be consistent. Barring that, I'd appreciate any tips to investigate the mismatches.