How to create custom connector with dynamic URI in power automate?

165 Views Asked by At

I have one Postman collection and I have created a custom connector using that collection. All is working well but one request has URI as in the below image.

enter image description here

where urn%3Ali%3Aimage%3AD5622AQEcyXncoACqYw part is dynamic and it will change for every new request. In the custom connector it took https://api.linkedin.com/rest/images/urn%3Ali%3Aimage%3AD5622AQEcyXncoACqYw as URI and does not allow me to add urn%3Ali%3Aimage%3AD5622AQEcyXncoACqYw dynamically like image below.

enter image description here

How can I do that?

2

There are 2 best solutions below

0
Sam Nseir On BEST ANSWER

Under 1. General, set the following:
enter image description here

Under 2. Definition, set the following:
enter image description here

You add parameters by adding {paramName} in the URL.

0
VonC On

I see in "Power Platform / Connectors / Create a custom connector from scratch" a section "Step 4: (Optional) Enable your connector as an AI plugin" where you can define parameters for your connector:

https://learn.microsoft.com/en-us/connectors/custom-connectors/media/define-blank/plugin-parameters.png

So, when defining your custom connector, you would need to specify the URL structure in a way that can accept dynamic segments. For example, if your base URL is https://api.linkedin.com/rest/images/, you can define the dynamic part as a path parameter like {imageId}.

In your custom connector definition, you would have something like this:

https://api.linkedin.com/rest/images/{imageId}

So, when defining your custom connector, you would need to specify the URL structure in a way that can accept dynamic segments. For example, if your base URL is https://api.linkedin.com/rest/images/, you can define the dynamic part as a path parameter like {imageId}.

In your custom connector definition, you would have something like this:

https://api.linkedin.com/rest/images/{imageId}

When you use this connector in a flow, you will provide the dynamic part of the URL, urn%3Ali%3Aimage%3AD5622AQEcyXncoACqYw, as the value for the imageId parameter.

imageId: urn%3Ali%3Aimage%3AD5622AQEcyXncoACqYw