This document defines some errors you may see while creating custom connectors in Flow or Power Apps, and provides some troubleshooting steps and possible solutions.
Custom Connector Test 500 error - Expression value is invalid. The template field is required
Error 500: Expression value is invalid. The template field is required.
There can be several reasons for what might be causing this issue, but the most common reason is related to how the path and host fields are defined in the swagger. The path of each action is relative to the host of the API you are trying to reach, which ends up getting constructed as <host/path>.
In order for this construction to happen successfully and to properly reach your API's endpoint, the path for the specific action cannot be "/". You should try having a path with “/” and a string value afterwards (such as “/foo/”) instead of just “/”.
Suppose you want to call the endpoint contoso.com/helloworld. When configuring your custom connector, you might see that the swagger is defined as...
The problem here is that the host has the name of the endpoint we are trying to call, but the path should be the one with the endpoint name of /helloworld. So, the correct way of defining this is...
For more information, see: Swagger Paths and Operations