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 / Create HTML Table afte...
Power Automate
Answered

Create HTML Table after Apply to each to send email

(0) ShareShare
ReportReport
Posted on by

Hello 😊 So I am facing a blocker in one of my flows. I am fetching the data from Azure DevOps from the Query Results.

hjoshi4u26_1-1683006286067.png

The field 'Assigned To' contains the value in the format 'NameSurname<EmailId>' for e.g., 'XyzAbc<xyzabc@domain.com>'. Before creating the HTML table and sending it in the email, I have to separate both the Full name and EmailId, which I have done using Apply to each step.

hjoshi4u26_2-1683006439857.png

I get Full Name in Compose_2 and emailId in Compose_4. Now I need to create a HTML Table which will have the Work Item ID, Full Name and EmailId columns. For that I need to first map the columns and outputs in Select. But I do not know what to use as an input in Select..? I have faced this scenario 1st time. Any help will be much appreciated 👍

hjoshi4u26_3-1683006816622.png

 

Categories:
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @hjoshi4u26 

     

    select expects input as array 

    in your case, initialize a variable at start of flow which is of array datatype, in the apply to each, append the json object as element to the that array variable, and then use that array variable as input to select item.

     

    But i would suggest this way to make flow faster.

    Nived_Nambiar_0-1683008404620.png

     

    here in select action 

    Nived_Nambiar_1-1683008435052.png

    here item() represent each element from value array object from which we are extracting a particular value using key , here i am not sure about the column name of WorkItem ID, so make changes acordingly to that.

    Nived_Nambiar_2-1683008515148.png

     

    this is for extracting name using same expresssion u have used.

    split(item()?['System.AssignedTo'],'<')?[0]
     
    Nived_Nambiar_3-1683008561458.png

     

    same expression to capture email which you have shared

    replace(split(item()?['System.AssignedTo'],'<')?[1],'>','')
     
    at last in send email, in body i have specified this html tableby adding border to it using expression
    Nived_Nambiar_4-1683008641366.png

     

    expression: 

    replace(body('Create_HTML_table'),'<table>','<table border="1">')
     
     
    Hope it helps
    Mark it as solution if it resolves your query !
     
  • hjoshi4u26 Profile Picture
    on at

    Thank you for solution 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 464

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 323 Super User 2026 Season 1

Last 30 days Overall leaderboard