How to get query parameters in a Logic App?

百般思念 提交于 2019-12-11 07:02:55

问题


I'm trying to pass an extra query parameter to Azure logic app so that I can process below data in the Logic App workflow

For Example https://logicURL?SelectedData="%7BsiteURL%3AXYZ.sharepoint.com%2Fsites%2FXYZDev%7D" (encoded string)

In HTTP action I am trying to handle above passed data with below JSON schema

{
    "kind": "Http",
    "inputs": {
        "schema": {
            "properties": {
                "selectedData": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    } }

I am not getting selectedData value. I need to use decodecomponentURI and then use the JSON value.

Azure logic app schema

Find the error here

Azure logic app run time error


回答1:


First, you need to add your query param to the existing ones, e.g.

https://xyz.logic.azure.com:443/workflows/id/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=code&SelectedData="%7BsiteURL%3AXYZ.sharepoint.com%2Fsites%2FXYZDev%7D"

https://xyz.logic.azure.com:443/workflows/id/triggers/manual/paths/invoke
  ?api-version=2016-10-01
  &sp=%2Ftriggers%2Fmanual%2Frun
  &sv=1.0
  &sig=code
  &SelectedData="%7BsiteURL%3AXYZ.sharepoint.com%2Fsites%2FXYZDev%7D"

Then, you should be able to get them in your Logic App using

@triggerOutputs()['queries']['SelectedData']

As you can see, there is no need to add a schema to the Http Trigger to get a query parameter



来源:https://stackoverflow.com/questions/51028620/how-to-get-query-parameters-in-a-logic-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!