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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert Array into Ref...
Power Automate
Answered

Convert Array into Reformatted String of Email Addresses

(1) ShareShare
ReportReport
Posted on by 39
Hello,
 
I need to have the output of an array that includes values from a Sharepoint List converted into a string with only the emails. The column it is pulling from is of type Choice.
The output is a list of email addresses, but the values are currently being pulled with extra characters, which means I cannot add the output as Dynamic Content in the 'To:' section of the 'Send an email (V2)' action. I've seen other solutions online that only seem to work if you want to send a separate email to each user with the Apply to Each function, but I want to send 1 email to all unique users.
 
Output I'm trying to fix:
 
I need this to instead be returned as just a string of the email addresses, separated only by a space, at most.
Or, I need an additional action/ expression that will convert it to that format.
 
-----------------------------------------------------------------------------------------------------------------------------------
 
Here is the whole list of actions ('Get items' action used to access Sharepoint List items is above these):
 
------------------------------------------------------------------------------------------------------------------------------------
 
Action Details:
 
---------------------------------------------------------------------------------------------------------------------------------
 
'BuyerEmail.Value' Expression: item()?['BuyerEmail']?['Value']
 
'Compose - Remove Duplicates' Expressionunion(outputs('Compose_-_Empty_Array'),body('Select_-_Users'))
 
---------------------------------------------------------------------------------------------------------------------------------
 
Thank you for taking the time to read this. 
Thank you in advance for any help.
 
Cheers
Categories:
I have the same question (0)
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    You need to first update the Select action. Switch to text mode
     
     
    This will return the array as:
     
    [
    "john.doe@example.com",
    "jane.smith@example.com",
    "david.johnson@example.com",
    "emily.brown@example.com",
    "michael.wilson@example.com"
    ]
     
    Then use join action
     
     
    Final Output
     
     
     
  • CU18091915-0 Profile Picture
    39 on at
    @SudeepGhatakNZ Amazing. Fixed in 10 minutes what I've spent a few hours troubleshooting. Sincerest thanks.
     
    For posterity, the main issue causing the extra characters was fixed by just using item()?['BuyerEmail']?['Value'] expression in the text mode of the Select action, and deleting all other characters that had automatically populated. The '?['Value]' part of the expression is only used because the Sharepoint List column is Choice type, and this keeps it from pulling in other metadata characters.
     
    The only change I made to Sudeep's suggestion was using a space instead of a semicolon for the 'Join with' value in the 'Join' action. This is because my email addresses were already stored with a semicolon on the end.
     
    Again, sincere thank you, Sudeep.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard