I have an flow that gets items from a SharePoint list, creates HTML table and emails it. We have a column in our SP list that is a person column where Sales Person is associated to the record in the list. I want to add the Sales Person Email to the CC field in the Outlook Email V2 action which emails a single HTML table. There may be 20 records or less in the email table and need to CC any unique person/email where someone is assigned to the record. Am I able to do this without the Apply to each? I only want a single email to go out so looking for some code that can get all unique Sales Person emails in the list of records in the table and add them to the CC in the outgoing email.
Thanks!
Resolved
Used Select function to select the sales person email
Then Compose with a union "union(body('Select'),body('Select'))"
Then join function from outputs of Compose and Join with ";"
Used the output of the join to get a distinct list of emails to use in the CC
Reference post here:
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492