How to set URL of a Logic App Custom Connector dynamically?

Baburaj Parappilly 0 Reputation points
2024-09-04T08:24:35.3833333+00:00

Is there a way to set the host of a Logic App Custom Connector dynamically?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 14,831 Reputation points Microsoft Employee
    2024-09-04T17:48:47.9333333+00:00

    Hi @Baburaj Parappilly Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    Looks like there is no straight forward approach to change the URL of the Logic App connector dynamically. You can explore the option to Use custom code support in your connector which lets you transform requests and response payloads beyond the scope of existing policy templates. Transformations include sending external requests to fetch additional data. When code is used, it will take precedence over the codeless definition. This means that the code will execute, and the request won't be sent to the back end.

    Please refer the sample Forwarding and transform script which forwards the incoming request and transforms the response returned from the backend. Please note that this approach has a limitation that script must finish execution within 5 seconds and the size of your script file can’t be more than 1 MB. Please refer to Custom Code FAQ for more details.

    Alternatively, if you consider using Power Platform, there is an easy way to Set Host URL for custom connectors. Please refer a sample implementation that uses the parameter x-ms-apimTemplateParameter.urlTemplate to specify the host URL in the following GitHub sample

    Hope this helps! Please let us know if you have any additional questions or need further clarification.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.