Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

azure - How to get query parameters in a Logic App?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...