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
In the search box, enter http request. From the triggers list, select the trigger named When a HTTP request is received. The HTTP request trigger information box appears on the designer. The endpoint URL that's generated after you save your workflow and is used for sending a request that triggers your workflow.
Add a condition to the logic app. Log in to the Azure Portal. Click Resource Groups-> Resource (in which you have created the logic app) -> click on the respective logic app. Click Edit. Click Code view. Under parameters, add a new parameter. Under Send_email action, update the To address with the newly added parameter value.
Click Resource Groups-> Resource (in which you have created the logic app) -> click on the respective logic app. Click Edit. Click Code view. Under parameters, add a new parameter. Under Send_email action, update the To address with the newly added parameter value. Save the changes.
To use the parameter, find and add a Response action to your logic app. Under the Request trigger, select New step > Add an action. Under Choose an action, in the search box, enter response as your filter. From the actions list, select the Response action.
Log in to the Azure Portal. Click Resource Groups-> Resource (in which you have created the logic app) -> click on the respective logic app. Click Edit. Click Code view. Under parameters, add a new parameter. Under Send_email action, update the To address with the newly added parameter value.
FirstName
LastName
and FaveColor
propertieshttps://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 &FirstName=Huomer &LastName=Huimpson &FaveColor=
triggerOutputs()['queries']['FirstName'] triggerOutputs()['queries']['LastName'] triggerOutputs()['queries']['FaveColor']
triggerOutputs()['queries']?['FirstName'] triggerOutputs()['queries']?['LastName'] triggerOutputs()['queries']?['FaveColor']
coalesce(triggerOutputs()['queries']?['FirstName'] , 'Puomer' ) coalesce(triggerOutputs()['queries']?['LastName'] , 'Puimpson' ) coalesce(triggerOutputs()['queries']?['FaveColor'] , 'Purple' )
## BEFORE @triggerOutputs()['queries']['SelectedData'] ## AFTER @{coalesce(triggerOutputs()['queries']?['SelectedData'] , '__blank__')}
@{}
syntax can be used if you are editing workflow definition language directly, but not if you are entering it in the "expression dialog box"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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With