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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need help to output th...
Power Automate
Unanswered

Need help to output the results to html table which uses parse json and apply to each

(0) ShareShare
ReportReport
Posted on by 10

My flow agenda:
1. i am extracting first 25 applications with their displayname, appid and password credentials with below http request in power automate.
https://graph.microsoft.com/v1.0/applications?$top=25&$select=displayname,appid,passwordCredentials
2. I want to parse the body of http such that i can extract displayname,appid and passwordCredentials
3. now i want to check for null values in passwordCredentials using condition.
4. if the passwordCredentials is not null, again parse this passwordCredentials such that i can extract enddatetime from it.
5. then again i need to check a condition for enddatetime whether it is greater than current date.
6. if the enddatetime is greater than current date then i need to output the displayname of app, appid and enddatetime in a html table.
7. finally send email with output of html table.

 

Error:

But after checking the  condition enddatetime > utcnow(), I used html table to output the values and then append variable.

But when i use send email action with the output of variable, it shows headers added to each row and also it is not in a perfect html tablular format.

output i got in email:

Siddiq53_5-1683818518983.png

 

 

Flow looks like this:

Siddiq53_3-1683818257313.png

 

flow looks like this after the date check condition:

Siddiq53_4-1683818324900.png

 

--->need help with where I can exactly insert html table action and email action to get only one email with results of all the apps with their displayname, appid, expiry(enddatetime) in tabular format

Categories:
  • Henderson87 Profile Picture
    83 on at

    The date is in a very specific format for UTC now function as well as the source that you are using. To have the condition work correctly the two dates need to be in the same format. I recommend adding a compose action with an expression for each date you are comparing i.e (

    formatDateTime(addDays('1899-12-30',int(items('Apply_to_each')?['Start']),'MM/dd/yyyy'),'MM/dd/yyyy')) this converts excel date to a format you can use)
     
    Once you have the compose action as part of your flow, when you run the flow it will show you the format of the date that you have. when the outputs of the two compose functions for the dates are in the same format then compare the two. 
     
    Looks like you are appending the array okay you just need to have the email outside the apply_to_each loop and reference the variable htmltab. the loop then fills the htmltab and the email sends it when the loop is complete.
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Siddiq53 ,

     

    You are almost there. You might want to add some column width to beautify your html

    SudeepGhatakNZ_0-1683842373428.png

     

  • Siddiq53 Profile Picture
    10 on at

    Actually the issue not with the date condition. the condition is working fine. And it gives me output of only those items where the enddatetime is greater than utcnow. But if you check my output, the headers are added to each row. But i need to get output in such a way that I get a correct html table with headers only once at the top. for this i need to output the objects to html table. but not sure where to use this html action.

  • Siddiq53 Profile Picture
    10 on at

    I can use email action at the end. But i want the output in the form of a html table. But in my output there are headers added to each row. Also the table format is shattered. Appreciate if you can help where to use html table action to fetch the outputs. I used it already at the end before email. But then, the columns are not populated as per the htmltab variable.

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Siddiq53 ,

     

    Are you applying the header in Apply to each branch?

    You could set the header in the Initiatiase variable action and just populate the data within the loop.

    That way your table would have just one header.

     

  • Henderson87 Profile Picture
    83 on at

    Ahh I think I see the problem. Try setting the variable up as an array. Then use the append to ARRAY variable. This converts over to the HTML table much better than the String.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard