Reputation: 3057
I can successfully trigger Logic App from my Pipeline in ADFv2 via web activity. But now I would like to send also some user-defined parameters to logic app. My question is now:
How can I send parameter from web Activity to logic app
How can I extract this parameter in logic app
Upvotes: 1
Views: 3679
Reputation: 146
On the Azure Data Factory-v2 side:
See this image for how to fill fields in settings tab
You have already figured what goes into URL and Method field in settings tab as you have successfully triggered logic app.
Let's suppose we want to send parameters in JSON (preferred way). Set 'NAME' Headers field to 'Content-Type' and 'VALUE' to 'application/json'.
In the body send you parameters in the form of JSON. Let's send following dummy parameters
{"Location":"northeurope","Model":"dummy_model","Server_name":"dummy_service","Onwer_email":"[email protected]"}
On the Logic App side:
You have already used 'When a HTTP request is received' trigger for logic app.
In the 'Request Body JSON Schema' field, enter the following schema to catch parameters send from ADFv2 web activity:
{
"properties": {
"Location": {
"type": "string"
},
"Model": {
"type": "string"
},
"Onwer_email": {
"type": "string"
},
"Server_name": {
"type": "string"
}
},
"type": "object"
}
You can also use 'Use sample payload to generate schema' instead of doing step 2 above. When using this option simply paste the json that you passed in body of ADFv2 web activity. It will automatically generate JSON schema to catch parameter.
Set the 'Method' field to the same method that you selected in ADFv2 web activity 'Method' field.
In subsequent steps in logic apps (for example initialize variable step) you can now use parameters set above (Location, Model, Onwer_email and Server_name) as Dynamic content using 'Add dynamic content' option. See this image for help.
Upvotes: 2