JSON parsing in Azure Logic app

I have an HTTP listener with which I send the body of a JSON message.

{
"recipient":"bob@example.com",
"subject":"this is a test subject",
"body":"this is a test body email"
}

I am trying to pull these individual parameters into the next thread, but errors instead!

The result I want to achieve is " bob@example.com ", taken as input for the next action.

I tried things like

"@{triggers().outputs.body.Content.recipient}"

and various options, but I suspect I'm missing something!

edit to add

I am currently sending a send request via Powershell, although it will end up being more than C # in the end

$a = @"
{"recipient":"bob@example.com","subject":"this is a test subject","body":"this is a test body email"}
"@

Invoke-WebRequest -Uri     https://httplistenerc743421edf234899a1315aa38c6398bc.azurewebsites.net/listen -Method POST -Body $a
+4
source share
3 answers

, HTTP Listener - String, JSON, . @parse().

, , :

@{JSON ((). Outputs.body.Content).recipient}

. , .

+9

HTTP-, HTTP-, .

+2

as I did with mine, where the azure function returns json data as text / string:

@{body('azure_fun_Name').recipient}
@{body('azure_fun_Name').subject}
@{body('azure_fun_Name').body}
+1
source

Source: https://habr.com/ru/post/1605785/


All Articles