cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Iterating over array and sending mail with html table when array element condition is met

I have a Kusto query which retrives data in one single row for - error codes along with their respective error count. Using Flow i am able to populate an array and added the 'interesting' error codes with some user friendly text appended.

 

How can i iterate over the array and create a html table so that the user friendly text values is in the first column and the error count is in the 2nd column and send it in the email body? Also if possible i'd like to add headings for the html table columns.

2 REPLIES 2
Highlighted
Power Participant
Power Participant

Re: Iterating over array and sending mail with html table when array element condition is met

Hello @faisalsns ,

 

There is a nice action for this to transform array into html table:

Flow_HTML.jpg

 

And for this action under advanced opitons there is possible to put custom headers to your table and pick columns you want:

Flow_HTML2.jpg

I also suggest to use css styling if you want to send it via email. You can be inspired for example here https://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy

 

BR
Pavel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
New Member

Re: Iterating over array and sending mail with html table when array element condition is met

In your screenshot are "Distrikt" and "Storesstring" variables? For me these are calculated dynamically by splitting the error code from the array. The limitation am facing is i need to use a iteration to create the html table i.e. with 2 columns as described earlier but the output of the html table is not visible outside the "Apply to each" block. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,331)