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 / Custom columns in HTML...
Power Automate
Answered

Custom columns in HTML table create unwanted "Apply to each" which ruins the flow

(0) ShareShare
ReportReport
Posted on by 28

I Have a flow which groups Sharepoint list items per email and then will send email. I have managed to group items per email and create HTML table which then is sent. I tried to format the table by using custom columns but when I start doing it "Apply to each" is automatically created which loops the action and user gets numerous email instead of one with grouped items.

Is there any other way I can just delete unwanted columns after creating HTML table?

 

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    Are you able to post a screenshot(s) of your flow to see how it's currently setup and what you are using for the HTML Table?

  • JoannaW Profile Picture
    28 on at

    Sure, here it is.

    1. Get items Sharepoint list

    2. Then Select - mapping email:

    JoannaW_0-1666357988875.png

    3. Compose - getting unique emails, expression is: 

    union(body('Select_-_get_emails'),body('Select_-_get_emails'))

    JoannaW_1-1666358048183.png

    4. Filter array&create HTML table. Output is from Compose action.

    Value for filter array is: items('Apply_to_each')?['COEsemail']

    Body in create HTML table is from Filter array.

    JoannaW_3-1666358208857.png

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Everything looks fine to me. Not sure why you would get another loop when you go to use custom columns in the Create HTML table unless you're using fields directly from the Get items action instead of the Filter array.

     

    Another option to just have the columns you want in the HTML table is to use a Select after the Filter array (using the Filter array fields as the values). Then use Create HTML table using the Select output (which only has the columns you want).

  • JoannaW Profile Picture
    28 on at

    From filter array I only have "Body" or "Item" available in dynamic content, not the exact fields I need:

    JoannaW_0-1666363027803.png

     

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    For the value you can just use the expression below to get each field value:

    item()?['NAME_OF_COLUMN']

    Example: I wanted to get the Title of the item and the COEs Display Name (assuming your field is called COE) you could use the following:

    item()?['Title']
    item()?['COE/DisplayName']

    To see all the actual field names, you can look at the output of your Filter array.

  • JoannaW Profile Picture
    28 on at

    Thanks a lot @grantjenkins !!

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard