2

In a Logic App, is it possible to send arguments via the URL?

The first step in the app is a "When a HTTP request is received" trigger that generates a URL. For example:

https://prod-28.northcentralus.logic.azure.com:443/workflows/xxx/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=xxx

If a user to adds an argument, say &country, can the application read it, or is it better to pass arguments like this via the body? It would look something like this:

https://prod-28.northcentralus.logic.azure.com:443/workflows/xxx/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=xxx

Bonus question: if the arguments should be passed in the body, when should a GET trigger be used in in a Logic App?

crowhill
  • 2,398
  • 3
  • 26
  • 55

2 Answers2

0

Yes, you can send in a query string parameter such as appending the Logic App URL with &country=Iceland.

If you check the raw output produced by the "When a HTTP request is received" trigger then you will see the following object:

{
   "headers": { LIST_OF_HEADERS },
   "queries": {
       "country": "Iceland"
   }
}

The Queries object is available to use in other shapes within the Logic App.

eimajtrebor
  • 143
  • 5
  • I notice that Azure defaults to POST on request triggers. Do you have an opinion on how commonplace using a GET like this would be? – crowhill Feb 09 '18 at 17:03
  • @jimmyz88 When you say "raw output", do you mean "Code View"? Can you expand you code snippit please? Thanks – woter324 Aug 16 '18 at 14:37
  • By raw output I am referring to the output in the Run History. So setup a simple HTTP request trigger then copy the URL. Hit the URL in a browser or Postman and append an argument/query string. You should see the value in the outputs in the run history. – eimajtrebor Aug 20 '18 at 10:30
-1

I know this is an old post but with the queries parameter we can pass the query string parameters like shown below.

enter image description here

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77