Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Compose output using union express to format email addresses for CC line.

Like (0) ShareShare
ReportReport
Posted on 4 Nov 2020 23:56:07 by 38

Hi all, 

I have a variable that collects email address information from an Excel file earlier in the Flow. I then use a union expression in a compose action to find distinct values in the collected array. I intend to use the output of the compose action and insert it in the "CC" line of the "Send an Email Notification". It looks like it's working well up until the last step. 

Where am I going wrong in the address formatting? The deliver fails, firstly, but the email address is formatted strangely with extra information. 

ms_hel_0-1604534083476.pngms_hel_1-1604534099995.pngms_hel_2-1604534112088.pngms_hel_3-1604534124073.png

 

  • Verified answer
    Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 05 Nov 2020 at 05:21:09
    Re: Compose output using union express to format email addresses for CC line.

    The email addresses are formatted correctly. The output of your compose action represents an array of values. To use them in a CC field they need to change from an array into a string. In your CC field, try the following expression:

    join(outputs('Format_Distinct_Email_Addresses'), ';')

    This expression will convert an array of values from:

    [ "ms_hel@somedomain.com", "Paulie78@powerusers.microsoft.com" ]

    To:

    ms_hel@somedomain.com;Paulie78@powerusers.microsoft.com

    The semicolon is the correct delimiter for an email to or cc field.

     

    Please...

    If I answered your question Accept it as a solution ✔️ 

    If I helped you out, please give me some Kudos 👍

    Thanks 😙

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
Churchy Profile Picture

Churchy 6

#2
Chriddle Profile Picture

Chriddle 4 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 4

Overall leaderboard
Loading started
Loading started
Loading complete