Skip to main content

Notifications

Community site session details

Community site session details

Session Id : JQstNhaMhmI+9cdDAfNXJD
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

 

  • sachk1 Profile Picture
    258 on 07 Jun 2023 at 10:06:59
    Re: Compose output using union express to format email addresses for CC line.

    @Paulie78  Hi,

     

    I'm having the same issue. I did as per you explained and got error. Can you suggest me any mistake form here?

    Thanks

    sachk1_0-1686132411729.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 😙

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

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started