Set Host URL
Template ID: dynamichosturl
Replaces host URL with the URL generated from the template. This template is available in Power Apps and Power Automate.
In this article
The target use cases for this template are scenarios where the request has to be routed to a backend host url which is dynamic and depends on one or more connection parameters, query parameters or headers. The URL template parameter supports expressions to enable this scenario and the operations parameter allows you to scope down the application to a specific subset of operations if needed.
If you use this template, please keep in mind that the host url defined in the connector will no longer be relevant for the correspinding operations since it will always be replaced by the value evaluated by this template.
Note that this policy currently does not support Gateway urls.
Let’s look at some examples that use the following parameters.
headers: test=foo; port=1234
connectionParameters: cat=bar; subPath=path
|Resulting host url
Examples from open-sourced connectors
We have multiple instances of this template being used in our open-sourced connectors repository.
|Host URL depends on the key vault name which is a connection parameter
|Host URL depends on the region which is passed as a header
|Cognitive Service Text Analytics
|Host URL is supplied by the user as a connection parameter but also has a default
|Specifies template from which host URL will be generated. This parameter supports expressions. Click here to learn more about expressions.
|List of actions and triggers to which the policy will apply to. If no operation is selected, this policy will apply to all operations.