如何在Logic App中获取查询参数? [英] How to get query parameters in a Logic App?
问题描述
我正在尝试将一个额外的查询参数传递给Azure逻辑应用程序,以便我可以处理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
例如 https://logicURL?SelectedData = %7BsiteURL%3AXYZ.sharepoint.com%2Fsites%2FXYZDev %7D(编码字符串)
For Example https://logicURL?SelectedData="%7BsiteURL%3AXYZ.sharepoint.com%2Fsites%2FXYZDev%7D" (encoded string)
在HTTP操作中,我试图使用下面的JSON模式处理上面传递的数据
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"
}
} }
我没有获得selectedData值.我需要使用解码组件URI,然后使用JSON值.
I am not getting selectedData value. I need to use decodecomponentURI and then use the JSON value.
在此处查找错误
推荐答案
首先,您需要将查询参数添加到现有的参数中,例如
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"
然后,您应该可以使用
@triggerOutputs()['queries']['SelectedData']
如您所见,无需在Http触发器中添加架构即可获取查询参数
As you can see, there is no need to add a schema to the Http Trigger to get a query parameter
这篇关于如何在Logic App中获取查询参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!