cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
elizi
Level: Powered On

Using query parameters values in policy details - custom connector

I've built a custom connector that takes single parameter from the flow, the flow is very simple for now:

 

2020-01-13_1420.png
I want that the input from the flow will be passed inside the policy details into Query parameter value as a parameter:

(The Query parameter name - $filter is taken from the URL via building the action in the custom connector).

 

2020-01-13_1423.png

please assist on this one, there isn't any reference regarding the required syntax.

 

Thanks!

3 REPLIES 3
Super User
Super User

Re: Using query parameters values in policy details - custom connector

Hi @elizi 

Just so I better understand the situation here, in your screenshots you are showing the filter set to the value 123456. Is this value being sent successfully to your Custom Connector endpoint?

If so, in order to make use of the Input from the Flow you simply need to use the Dynamic Property that relates to your input as the value for the $filter query parameter.

 

image.png

 

Apologies if I have misunderstood the issue.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

elizi
Level: Powered On

Re: Using query parameters values in policy details - custom connector

@LeeHarris Thanks for you response,

 

what i meant is to pass the value from the input (shown as $filter in the custom connector) to the policy query string parameter,

 

in the policy query parameter value (the field as i showed with the red arrow in my screen shot) i want to add query like:

userID = 123456 (the number 123456 is my input from the custom connector within the flow it self)

 

hope that clarify's my question.

 

Thanks!

Super User
Super User

Re: Using query parameters values in policy details - custom connector

Hi @elizi 

I don't have experience using policy details but have been able to pass dynamic values to a custom connector as part of the query string which may meet your requirement.

 

First thing that you need to do is make sure that the query parameter can be set when calling the endpoint via your Custom Connector. This is done within the Custom Connector's Definition. You can either add a new action or update an existing one. The area that you need to change is the Request, where you will see the option to import from sample.

Click on this and then define the endpoint, in my case it was a simple GET request with a single query parameter called "language". Notice how the value of the query parameter is within double curly braces as "{{Language}}". Writing it this way is important. Click Import and the request will be added to the action.

 

QGate.Breeze_2020-01-14_13-30-10.pngAdd the sample request

 

You should now see the Request definition with the query parameter that you defined in the URL string (in my screenshot below this is "language"). If you click on the ellipses next to the query parameter you will be shown a screen where you can change the properties of it.

 

chrome_2020-01-14_13-25-04.pngQuery

 

Within the properties of the query parameter you can define a default value, and whether it is required or not, along with several other options (clicking the Learn more links should provide all the information you need for these). Once you are done, you can test the action and update your connector.

 

chrome_2020-01-14_13-25-25.pngDefinition

 

Back in your Flow, add the action from your Custom Connector and you should now see any Query Parameters that you defined as properties of the action. You can see in my example that it has used the default value I defined in the Connector and it is not marked as required. Simply add your Flow input from the Dynamic Content to this property and the value will be sent in the request.

 

chrome_2020-01-14_13-27-33.pngPopulate query parameter with value

 

Hope that helps.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,552)