web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Kusto Results into Par...
Power Automate
Unanswered

Kusto Results into Parse JSON into Update CDS Record

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi folks!

I've got a flow set up that when a CDS record is created, it pulls one of the fields, munges the input, runs a kusto query, then parses the JSON result.

 

So far, every step of the way gets output that I'm expecting, and successfully completes. Where I'm running into problems is writing that content back into the record with the "update a record" action. When I test what happens, everything is showing that it's running correctly, but the values coming from the parse JSON action are empty, even though they're correctly showing up in the dynamic content pane of the builder.

 

Flow Run:

Good Run.jpg

Parse JSON output:

ParseJSON.jpg

 

Null Values in "Update a record":

Null Data.jpg

 
Categories:
I have the same question (0)
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @TimRob 

     

    Could you try adding a Compose action and put one of the Parse JSON values inside like OrgsId and run the flow. Please let me know what value comes up in the Compose action.

  • TimRob Profile Picture
    Microsoft Employee on at

    I get a link to download the results, and then when I click on it, it opens a new blank page in the browser.

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at
    Hello @TimRob

    My thought is that their is something wrong with the Json Schema.

    Would you be able to give me an example output from the kusto list results action, so I can try to parse on my end
  • v-litu-msft Profile Picture
    on at

    Hi @TimRob,

     

    Could you please share the screenshot of the Parse JSON action?

     

    You could run the Flow to get the body of the "Run query and list results" action, then copy it then click the button "Generate from example" to past it. 

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • TimRob Profile Picture
    Microsoft Employee on at

    Here's the "Parse JSON" success. 

    ParseJSON-Full.jpg

  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @TimRob 

     

    There seems to be a issue with your schema. I tested a small sample on my side with the picture you provided. I used:

    {
     "value": [
     {
     "OrgsId": "1234567890-0987654321",
     "FriendlyName": "Communication Engineering",
     "UniqueName": "org123456",
     "State": 1
     }
     ]
    }

    As my body for the parse JSON and also used the same JSON for generating the Schema within the Parse JSON action. When generating the schema from sample I got this:

    {
     "type": "object",
     "properties": {
     "value": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "OrgsId": {
     "type": "string"
     },
     "FriendlyName": {
     "type": "string"
     },
     "UniqueName": {
     "type": "string"
     },
     "State": {
     "type": "integer"
     }
     },
     "required": [
     "OrgsId",
     "FriendlyName",
     "UniqueName",
     "State"
     ]
     }
     }
     }
    }

    Which looks very different from your schema. Another test I ran was I wanted to see if I could get the Dynamic content from the Parse JSON using a Compose action.

    Since the Body JSON provided is an array, indicated by: 

    "value": [

    When selecting the dynamic content for any of the values, flow automatically puts everything in a loop.

    This makes me believe that your schema is the root cause of the null values.

     

    To fix:

    - You can copy the entire body from the Parse JSON action you provided above. And paste it in the Parse JSON 'generate from sample' button. This should correct the schema

    or if this still does not work.

    Could you provide the full details from the Parse JSON body and or the body of the Kusto action. (You can change the values and give dummy data if you need)

  • TimRob Profile Picture
    Microsoft Employee on at

    Ok, I find this "interesting" that I generated the original schema by using the "Generate from Sample", and then used that functionality a second time to make this work. I see where the problem is now, and I had tried to brute-force it previously by nesting the "Update a Record" in an "Apply to Each" action for the "value" being retuned by the "Parse JSON".

     

    As always, a huge "THANK YOU" to the community for being helpful, patient, and knowledgeable! 

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Glad to help! 🙂 @TimRob 

     

    Do some tests though, Run flow with multiple queries coming from Kusto, and single records too.

     

    There is a chance your schema will not like one or the other. If this is the case, the schema can be modified to accept both array and non array values.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard