Reputation: 217
I have a WebHook activity in Azure Data Factory pipeline but I'm not able to pass variables here.
@json('{
"body": "@{pipeline().parameters.body}",
"name": "@{variables('name')}"
}')
There is a problem with '
. I've tried with \'name\'
but it does not work.
Upvotes: 0
Views: 1583
Reputation: 5034
The body representing the payload to be be sent to endpoint must be Valid JSON or an expression that results a value of type JSON. So in WebHook activity you can just pass the JSON string rather than using the function json()
again.
Checkout this example:
Use any string variable:
Using the variable and parameter in JSON string:
{
"var":"@{variables('variable')}",
"param":"@{pipeline().parameters.parameter}",
"age":"23"
}
by string interpolation, the value of variable is replaced in place
Upvotes: 4