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 query output for...
Power Automate
Unanswered

Kusto query output formatting into email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to hook up a flow which runs a kusto query and then sends an email to folks.

 

The kusto query has a 2 columns
1. manager alias

2. Data specific to manager

 

I managed to hook up the query + Compose step to extract 'Body' of the kusto query and compose and email with the 'Outputs'. The email I receive is a json output. for example
{"value":[{"L4Manager":"HENRYSA","Source":"Other","count_":1180},{"L4Manager":"ALBERT","Source":"Other","count_":14927}]

 

How do I parse this 'Output' so that 

1. I can send email to the L4Manager alias

2. Is there a way for me to compose the json into a table format similar to how we view results in Kusto explorer?

 

Thanks,

Sandeep

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @sandeepgeorge 

     

    Yes you can use the JSON Parse step to extract the values.

     

    Thanks

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @sandeepgeorge 

     

    Here it is

     

    image.png

     

    The schema is as follows:

     

    {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "L4Manager": {
    "type": "string"
    },
    "Source": {
    "type": "string"
    },
    "count_": {
    "type": "integer"
    }
    },
    "required": [
    "L4Manager",
    "Source",
    "count_"
    ]
    }
    }
     
    Thanks
  • Verified answer
    ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    hi @sandeepgeorge  here is what I do to create a table from your json response.

    nofirst.PNGnolast.PNG

    No value

    replace(string(outputs('Json')),'"value":','')

    No fisrt

    substring(outputs('NoValue'),2,sub(length(outputs('NoValue')),2))

    NoSecond

    substring(outputs('NoFirst'),0,sub(length(outputs('NoFirst')),2))

    Array

    replace(outputs('NoLast'),'","','"},{"')

     

    Hope this can help

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard