0

I created a logic app to get data when I trigger the logic app URI from external application. I am getting http response as expected into the logic app. As next step I am parsing JSON to get the values for specific items ("e.g. Table1") and pass into a variable. However, I get as null value into the variable

enter image description here

Below is the output of Logic app run where you can see the null value. Unable to find the root cause...

enter image description here

Http Trigger

enter image description here

Body:

{
    "headers": {
        "Connection": "close",
        "Accept": "application/json",
        "Accept-Encoding": "br,gzip,deflate",
        "Accept-Language": "en-GB,en; q=0.9",
        "Host": "prod-56.eastus2.logic.azure.com",
        "Referer": "http://localhost:3000/",
        "User-Agent": "Mozilla/5.0,(Macintosh; Intel Mac OS X 10_15_7),AppleWebKit/537.36,(KHTML, like Gecko),Chrome/86.0.4240.183,Safari/537.36",
        "origin": "http://localhost:3000",
        "sec-fetch-site": "cross-site",
        "sec-fetch-mode": "cors",
        "sec-fetch-dest": "empty",
        "Content-Length": "125",
        "Content-Type": "application/json"
    },
    "body": {
        "studyName": "S",
        "studyDescription": "DD",
        "Table1": "/csdm/table1.csv",
        "Table2": "/csdm/table2.csv",
        "Table3": "/csdm/table3.csv"
    }
}
Ruli
  • 2,592
  • 12
  • 30
  • 40

1 Answers1

0

I had the same problem. The reason was the wrong schema in the Parse JSON step. I also followed the Logic app read property of json stored in variable link. What I did was, I created a variable of the Object type called JSON_content and I placed the 'body' from the Logic App HTTP request trigger as the value. Then I added the Parse JSON action with the Content = JSON_content variable. Important thing was, that I used the input schema from the JSON_Content variable for the Parse JSON schema (using the Use sample payload to generate schema). Then the Dynamic content of the Parse JSON step consisted of JSON names (and values), which were not null finally, which I used further in the Logic App flow.