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 / How to filter a column...
Power Automate
Answered

How to filter a column in excel and send an email containing the filtered data per sheet and email

(0) ShareShare
ReportReport
Posted on by 160

Hi,

I'm trying to create a process to help me filter an excel column, get that data, and send an email to some identified email in another sheet.

to give a better view I have created "some kind" of a visual flow to try to explain the difficulty and if it's possible to create.

 

 

flow - Word.png

 

I do not know if I can attach the excel file, but I leave the prints below

file1.pngfile2.pngfile4.png

 

I had tried to create a flow base on some examples that I found. however, I can´t filter the result, and can't choose the second filter.

 

thank you in advance,

best regards

Rui

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Kamacete 

    are there any relations between sheet1, sheet2 and sheet3? Or do you just need to go through all sheets, only get the items where the status is "go", "check" or "Validate"? Also, I don't really get the value things, why do you need to filter it, if you are no matter what value it is, need to get the email address and send an email?

     

    Here is my first thought, hopefully I got your right:

    Use the excel action "List rows present in a table" and already apply the filter within the "Filter query" section to only get items in status "go", "check" or "validate". Do this for all three tables (you can use the "get tables" excel action with an "apply to each" around the "List rows present in a table") and add the result to an array variable within your flow (append to array variable). That will give you a complete array from all three sheets. I don't understand what your "group" is, that you want to put into the email, maybe you need to use some "Filter array" actions on your whole array variable to only get the items you want. Of course you also need to select the email address list (I guess the list will be unique in production, you should look for only having unique information in there).

    Also: When you have multiple actions executed every time for the same row or sheet, you could consider using a solution and child flows, that will get triggered with some information from the parent flow, does the job and sends back the information instead of building huge "apply to each" runs.

     

    Does this help you? Otherwise please give me some more information.

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • Kamacete Profile Picture
    160 on at

    Hi Marvin,

    Thank very much for you reply.

     

    The sheets are not related, but I have to go through all sheets to get the information and send one email by sheet (I can use the same email to send all sheets, just have to add a new column with the sheet name).

     

    I need to filter, because I just what to send 3 of 6 stages, I leave a example below for a better understanding. this is my blocking point for now, when I run the flow, I received one email by status.

     

    [Excel by sheet:]

    2.png

     

    [Email to be send:]

    2022-06-03 08_32_53-Window.png

    Emails address to be use or emails groups:

    for each email I need to put the "Owner" on to: and others emails on CC, those (CC: emails) are not in the sheet, or don't have tasks pending, that why I thought in add a new sheet with that information. but maybe I have a easy way to do it.

     

    in the end of the email I need just one more think. I need to upload the "Status" with a new status, in this particular case, I have to change from "new" for "info requested".

     

    I will tried to recover the flow that I had created based on an examples that I found and post here to show you what I have (I didn't post because I changed and the flow stop to work).

     

    I do not know if I pass the all picture, and I appreciate you help.

    thank you very much

    Rui

     

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Kamacete 

    I guess I got you in most cases, please correct me if I got something wrong:

    You could start by using the "List rows present in a table" for all three sheets to get the information. Try to filter it within this action using the Filter Query to only get the information you need within the email. Afterwards you could use the "Filter array" action to filter the sheet content into different smaller arrays/tables. Using "Create HTML table" you can generate the table from the smaller arrays, you can use this html tables within your email.

    To get all the email addresses from the other list, you can create a string variable at the beginning of your flow, use an "apply to each", run through the array with the information in it (in best case it's filtered by the emails you need using the "Filter Query" within the Excel action or using the "filter array" action. Then use the "apply to each" to add each email to the string variable with an ";" at the end of each email. This will generate a long string of all addresses you can use within your "Send an email" and this shouldn't generate multiple emails for the same content (only for each sheet).

     

    I didn't test it completely; I would need to rebuild this scenario. Maybe this already helps you, otherwise let me know and I will try to build something similar.

     


    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hi @Kamacete 

    I guess I got you in most cases, please correct me if I got something wrong:

    You could start by using the "List rows present in a table" for all three sheets to get the information. Try to filter it within this action using the Filter Query to only get the information you need within the email. Afterwards you could use the "Filter array" action to filter the sheet content into different smaller arrays/tables. Using "Create HTML table" you can generate the table from the smaller arrays, you can use this html tables within your email.

    To get all the email addresses from the other list, you can create a string variable at the beginning of your flow, use an "apply to each", run through the array with the information in it (in best case it's filtered by the emails you need using the "Filter Query" within the Excel action or using the "filter array" action. Then use the "apply to each" to add each email to the string variable with an ";" at the end of each email. This will generate a long string of all addresses you can use within your "Send an email" and this shouldn't generate multiple emails for the same content (only for each sheet).

     

    I didn't test it completely; I would need to rebuild this scenario. Maybe this already helps you, otherwise let me know and I will try to build something similar.

     


    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

    Blog: Cloudkumpel

  • Kamacete Profile Picture
    160 on at

    Hi Marvin, 

    Thank you once more.

    How can I send to you the flow that I have?

    it's to long to put in where.

  • Kamacete Profile Picture
    160 on at

    Let see if I can show what I have do in here.

    🙂

     

    1.png2.png3.png4.png5.png6.png7.png8.png

     

    thank you

    Rui

  • Kamacete Profile Picture
    160 on at

    Hi,

    I'm

    trying to apply more than one option on the filter, but without success.

    this is what I have.

     

    5ff2466a-785e-4d09-bac4-e14eabd81798.png

     

    I will have to apply another filter for another column, can some one help me it this?

    thank you in advance

     

    Rui

  • v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @Kamacete ,

     

    As we know we cannot use 'AND' and 'OR' operator in the filter query(List rows present in a table Action). In filter query, it only supports single 'eq', 'ne', 'contains', 'startswith' or 'endswith'. So we cannot create multiple filter queries in Power Automate list rows present in a table.

     

    Maybe you could consider adding a Filter array Action.

    @or(contains(item()?['Status'], 'Info requested'),contains(item()?['Status'], 'LT requested'))

     

    Here are some links that might help you:

    https://powerusers.microsoft.com/t5/Building-Flows/Filter-Query-to-show-last-month/m-p/1548939#M173255

     

    https://powerusers.microsoft.com/t5/Building-Flows/Multiple-Filters-on-List-Rows-Present-in-a-table-Update-Create/td-p/809374

     

    Best Regards,
    Charlie Choi

  • Kamacete Profile Picture
    160 on at

    Hi v-yujincui-msft

    thank you very much for your help. but it doesn't work.

    😞

     

    1.png2.png

    Could you please help me?

    Thank you

    Br,

    Rui

  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @Kamacete ,

     

    It seems that works fine on my side.

    @or(contains(item()?['Status'], 'Info requested'),contains(item()?['Status'], 'Need info'))

    vyujincuimsft_0-1654656175673.png

    vyujincuimsft_1-1654656243535.png

    Result Screenshot:

    vyujincuimsft_2-1654656418018.png

     

     

    Best Regards,

    Charlie Choi

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 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard