web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compose output using u...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on 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

 

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    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 😙

  • sachk1 Profile Picture
    258 on at

    @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

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard