@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