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 :)

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | Excel | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yi Lu_MSFT 17,611 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 44,751 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.