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 / How to perform multipl...
Power Automate
Unanswered

How to perform multiple string functions in one expression?

(0) ShareShare
ReportReport
Posted on by 38

I have an array of emails: {"body":{"emails":["email@email.com","email2@email.com"]}} and I am trying to get the final result of 

email@email.com,email2@email.com;     ....   Since I am trying to send an email to the emails in an array. To solve this I have 4 composes where I convert the array to string, then I substring the first 19 chars out of the string and then I substring the last 3 chars and finally use replace to remove quotes from the string for a final result of email@email.com,email2@email.com; 

 

Is there a simpler/more efficient way of doing this?

 

Here's a screenshot of my flow:

flowsample.PNG

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    If the emails are already in an array you can add the array to a for each loop.  The action in the loop is an append to string.  Just append each email from the array with an appropriate separator after it, like a comma or a semicolon.  Then once you exit the loop you'll have a comma or semicolon delimited string.  Depending on what you are doing with it you might want to drop the last character to get rid of the extra delimiter.

  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @TiagoSa,

     

    Since the email is a property of the object, so you can extract the array out firstly, then the join() function will be powerful in this situation, you can use the join() function to convert the array into a string and add the ";" into the array, then the array of Email addresses will be a string of email addresses separated by ";", for example:

    join(outputs('Compose')?['body']['emails'],';')

    Annotation 2020-01-07 144413.png

     

    Annotation 2020-01-07 144352.png

     Run result

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard