How to send only one email using Power Automate based on a condition in different rows in Sharepoint Excel?

KLOSINSKI Antoine-EXT 0 Reputation points
2023-01-18T21:37:28.2133333+00:00

I am trying to send just one email to a particular user in Power Automate, where the program runs through all the rows in an Excel file, and based on a condition, adds the particular rows to a table, which it then sends to the user altogether.

So far, I came up with this:

User's image

While I do understand that in this particular case, the HTML table is being created in the loop, and thus does not store all of the rows but just one at a time, what would be a way to change this? Is there any way I can take the table out of the loop, or "append" to it one by one like one would do in a programming language with an expression 'table++' or related?

Thank you in advance :)

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,457 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,607 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,639 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,044 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yi Lu_MSFT 17,456 Reputation points
    2023-01-19T06:13:56.8633333+00:00

    Hi @KLOSINSKI Antoine-EXT

    In your flow you get all the value from an excel then use "Condition" to filter it. As the action "Create HTML table" is in an "Apply to each" action, you could only get a row of the excel in your email.

    For this situation, you could change a filter function. Use "Filer Array" to get a new array of the excel value, then create HTML table based on this array. Here is a similar case for you:

    [https://powerusers.microsoft.com/t5/General-Power-Automate/Generate-HTML-table-from-Data-table-in-Excel-file/td-p/866220


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Limitless Technology 43,931 Reputation points
    2023-01-19T15:02:50.8366667+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    I have linked an article below that may help solve your issue. Here is what the article has to say:

    According to v-bacao-msft

    Just reconfigure the Flow to match the arrangement shown in the supplied screenshot in this forum.

    REFERENCE: https://powerusers.microsoft.com/t5/Building-Flows/Flow-to-send-just-one-email/m-p/284208#M29526

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments