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 / Split String Expression
Power Automate
Answered

Split String Expression

(0) ShareShare
ReportReport
Posted on by 34

Hello

I am working on a flow that requires me to extract email addresses from an Excel document in order to send separate emails containing specific information to each end user. However, I am encountering an issue with the split expression.

 

The issue is that the split expression is only recognizing the first email address and not pulling in the second email address. I have tried troubleshooting the issue, but I have not been able to resolve it.

 

1. The first portion of my build, is creating the table and drilling down to get the unique users:

tliwanag_0-1710877291244.png

2. Next, in my apply to each batch, I'm converting the unique email output to a string which creates this output "Worker Supervisor Email":"email1@email.com"}variables(outputs('Get_unique_users')){"Worker Supervisor Email":"email2@email.com"}

 

tliwanag_1-1710877547186.png

 

3. Then I isolate the email from the mapped value using this split expression: split(body('Convert_unique_email_output_to_string'), '"')[3] 

tliwanag_2-1710877605945.png

 

The split expression's output only shows email1 and not the other emails listed in the excel document

tliwanag_3-1710877680803.png

 

Can you assist with updating the split expression or is there another route I can take?  Thank you!

 

 

 

 

 

Categories:
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Could you explain a bit more? I'm not following you.

    It looks like you are:
    - Looping through some excel data

    - Grabbing email from each row in the loop

    - Adding some text before the email e.g. ("Worker Supervisor Email":"email1@email.com")

    - But then it looks like you are trying to get the email again by using some kind of split technique.


    I'm not sure if you're looking for an array of emails, but if you are:

    - Initialise a variable at the top of your flow, of type array

    - Then in your apply to each loop, use the append to array action and add the following code to your array variable:

    {
     "Worker Supervisor Email": "EMAIL_FROM_EXCEL_ROW"
    }

     

    When the apply to each action has completed you will have an array of emails.

  • tliwanag Profile Picture
    34 on at

    Hi there, my apologies for the confusion in my initial message and thank you for the reply. I am indeed pulling an array of emails which is working properly in my "Get unique Users' step which is the step prior to the 'Apply to Each' action. (see below) 

     

     

    tliwanag_0-1710944390021.png

     

    In steps 2 and 3 in my original post, I'm trying to isolate the emails so I can send specific info to each individual email address, but my split action is only capturing the first email (shown below) and other emails listed in the excel doc are not captured causing my email actions to not run properly.

     

    tliwanag_3-1710945933008.png

     

  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @tliwanag 

     

    Thanks for the clarification but I'm still a little confused! 😃
    If you have an array of emails, there is no need to "split" anything.

    Add an apply to each action and use the array of emails as the input (Get unique users).
    Throw a compose into the loop and use this code to get the email:

    item()?['Worker Supervisor Email']

     

    You should not need to split anything to get the emails.

  • tliwanag Profile Picture
    34 on at
    Haha - thank you! I'll give this a try
  • tliwanag Profile Picture
    34 on at

    This worked - I was trying to do too much 🙂 THANK YOU!

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    No problem - Glad it's sorted!
    d(-_-)b

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard