0
votes

I am creating a LogicApp with a simple request trigger as given in the example given below.I am trying to pass parameter using 'Start-AZLogicApp' cmdlet. While the Logic App does get instantiated when I run the cmdlet, the parameter does not pass and the workflow fails.

Start-AzLogicApp:-

https://docs.microsoft.com/en-us/powershell/module/az.logicapp/start-azlogicapp?view=azps-1.1.0&viewFallbackFrom=azps-1.0.0

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-http-endpoint

JSON:-

{
  "type": "object",
  "properties": {
    "address": {
      "type": "string"
    }
  },
  "required": [
    "address"
  ]
}

Payload:-

//
{
   "address": "21 2nd Street, New York, New York"
}
//

This works fine if I post the callback url in a browser and pass the parameters ,however if I use the above mentioned powershell cmdlet to trigger the logic app, then no parameter is passed. The actual cmdlet I am trying is:

$paramer='"address": "21 2nd Street, New York, New York"'
$paramerStart-AzLogicApp -ResourceGroupName "resource1" -Name "calling -logicap" -Parameters $paramer -TriggerName "manual"

Need some help to find out what should I pass that the HTTP request trigger accepts the passed parameter by this cmdlet.

1

1 Answers

1
votes

The Start-AzLogicApp method is used to start a logic app, the result is equivalent to using Run Trigger, it won't pass request body. And the parameter, it's the dynamic parameters, about parameters in the logic app you could refer to this doc.

If you want to pass your request body, you could use Postman to do it.You could send it in the raw. enter image description here

And don't forget to Content-Type in the header. enter image description here

Then the result will be right.

enter image description here