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 Automate
Unanswered

Automated Flow

(0) ShareShare
ReportReport
Posted on by 6

I'm looking to read a table of rows in an excel sheet with a similar format:

 

IDEMAILFNAMESTATUS
1test2@test.comATRUE
2test2@test.comBTRUE
3test3@test.comCFALSE
4test3@test.comDFALSE
5test3@test.comEFALSE
6test1@test.comFTRUE
7test1@test.comGFALSE

 

I'd like for the flow to read the status column, for all values that are TRUE.

 

I'd like it to store the ID and FNAME into an array based on the email.

 

Meaning that I can loop through an array of emails and send out all contents related to that email.

 

Example from above:

 

Test1@test.com would receive an email with ID 6 and FNAME F

Test2@test.com would receive an email with ID 1,2 and FNAME A,B (within the same email)

Test3@test.com would not receive an email

 

Essentially how can I create an array of emails that subsequently have an array of objects ID/FNAME that I can then refer to when sending emails.

Categories:
  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    @dwhalen 

     

    Super easy. Read these slowly. Just do exactly what it says, exactly. If you are done and it doesnt work then we can talk. I had to base everything off your Table above, so if columns are named wrong etc, thats on you to fix.

    This will 100% work as long as you have the right actions which I named.

     

    This would be like the 102nd time I have explained this and everyone got it correct just following these 🙂

     

    1. List Rows in a Table, use an odata filter for STATUS eq 'TRUE' (is this a string or a boolean field? looked like STring to me so I put 'TRUE' as that is not a true/false field

     

    2. Now we need to get an Unique list of Email Addresses

     

    Add a Select

    For the From/Input use the Dynamic value Property from Step 1

    Click the Map icon to make it Advanced.

    -type only this as an expression

     

     item()['EMAIL']

     

      you showed it as all caps

     

    This will create an array with only emails

     

    3. TO create the actual unique list

    -add a Compose

    -in the expression type 

     

    union(body('Select'), body('Select'))

     

     

    4. Now we add an Apply to Each, with the From/Input being the Output of the Compose, which now has a nice unique list of EmailAddresses for us to loop through and use to Filter out the rows we want to send in a Single email to the Email Address, containing ID and FNAME

     

    -INSIDE The Apply to each

    --Add a Filter

    ---From = your Dynamic Output value property from Step 1) the list rows

    ------In the left side, put the Dynamic Output EMAILADDRESS property from Step 1) the list rows

    ------in the middle leave is equal to

    ------in the right put the expression item()

     

    This will filter out only rows from the original list rows, that was already filtered by TRUE, to give you an ARRAY of rows that meet the email requirement and the TRUE requirement

     

    5. now add a Select action

    For the Input put the Output of your filter

    Add your Key/Values

    -For the Key put ID

    --for the Value put item()['ID']

    For the Next Key put FNAME

    --for the value put item()['FNAME']

     

    6. Add a Create HTML Table

    -in the Input put the OUTPUT of your Select

     

    7. Send the Email, which now is a SINGLE email with only the rows that are true and for this email address, that now contains the ID/FNAME in a name headered table

    --Add your To (no idea where you get this)

    --Add your Subject

    --In the Body, type whatever you want, but in some spot, put the Dynamic Output property from the Create HTML.

     

    And done

     
    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • dwhalen Profile Picture
    6 on at

    Any ideas why on step #4 the Filtered array is coming back empty when using item() in the right column for equal to. But when using outputs('Compose')[0] it returns an array of rows where that email matches?

  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    @dwhalen 

     

    Let me look again, but the Compose won't help you as what you typed there is simply accessing that ordinal output.

     

  • dwhalen Profile Picture
    6 on at

    Understood. I was able to work through the filter array using an Integer variable and incrementing it by 1 after the email is sent outputs('Compose')[variables('Compose Counter')].

     

    However, if able to use item() that would be cleaner and more efficient I believe.

     

     

  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    @dwhalen 

     

    Can you please verify what you have in the Input for the Loop and please paste in here what the Output of the Compose looks like?

     

     

  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    Yeah you dont need to do that counter crap. I just need to verify the Format of the output of the Compose, so I can give you the correct term to use.

     

     

  • Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at

    @dwhalen 

     

    And so we dont get bogged down too much, lets just update it like this

    Change your Select to be like this one, 

    on yours though instead of SerialNumber on the left, put Email

    and on the Right, put your Dynamic Email column

    Keep your Union Compose the same as is

    Keep your Apply to each input/from the same

    In your right side change it to

    items('Apply_to_each')['Email'] (note: use the proper name for Apply toeach or whatever your loop is called)

     

    FLMike_0-1697211042128.png

     

    Not sure why your version didnt work I use both but if you update to this, you should be fine.

    sorry for any confusion


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • dwhalen Profile Picture
    6 on at

    That change did the trick.

     

    Appreciate your help!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard