Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

[HELP] Flow to send email to multiple SP items, that include multiple email recipients

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have a flow that checks a SP list every day at 8 am.

If any item in the list has a Call Returned status set to No, it needs to send an email to all staff linked to that item.

The staff email column is a People Picker column.

 

Item 1 has two recipients, staff1@gmail.com, and staff2@gmail.com

Item 2 has 1 recipient. staff3@gmail.com.

 

I need the flow to send an email to the corresponding recipients, for each item.
Unfortunately what's happening at the moment is it's combining them and sending out 2 emails with all 3 in each.

I believe this is to do with my Append to Array variable.


What is the best way to do this?

  • tmaloney3 Profile Picture
    4 on at
    Re: [HELP] Flow to send email to multiple SP items, that include multiple email recipients

    Hi Levi, 

     

    Sure thing. I did try your setting variable and clearing it with a null value but because of the concurrency of the Email with Options step it wasn't working.

     

    We have a "Missed Call Log" SharePoint list that our administration staff fill in manually, including details such as:

    • Phone Call For (staff members name, can be multiple staff members)
    • Caller (name of the person on the phone)
    • Call Returned (default set to No)

    On creation of a new list item, a Power Automate flow runs, sending out an "email with options" (If the option in the email is clicked, sets "Call Returned" field to Yes, preventing the second flow from running) to all staff in the "Phone Call For" field. 

    This step is working perfectly. No issues here.

     

    The problem is with the second Power Automate flow i'm running.

    This second flow is a Reminder email, triggered using a Recurrence, happening at 8 am every weekday.

    Any item that still has "Call Returned" set to No, this flow is meant to send an "Email with Options" to all staff for each item, to return their missed call.

    Separate email for each missed call item.

     

    For example:

    Missed call #1 has 3 staff members listed.

    Missed call #2 has 1 staff member listed.

    Missed call #3 has 2 staff members listed.

     

    At 8 am this reminder flow needs to send out 3 emails.

    The first email combines the 3 staff members emails from call 1 into a string, each separated by a semicolon ;

    The second email doesn't need to combine, so it just sends it

    The third email combines the 2 staff members emails from call 3 into a string, separated by a semicolon ;

     

    How I currently have it set is:

    Flow triggered at 8am on a weekday >

    Get items (with Filter Query set to: Phonecallreturned eq 'No' ) >

    Initialize Array Variable. This will be populated later to combine each staff members email (EmailArray) >

     

    Apply to each item with Phone Call Returned = No > (NOTE: Concurrency is enabled)

      | Apply to each staff member in the item (Phone call for) > (NOTE: Concurrency is enabled)

         | Get user profile (gets their email) >

         | Append to array variable (EmailArray) > 

      | Join array with ; >

      | Send "Email with Options": The "To" field is the Join output >

      | Switch step for the "Email with Options" response (SelectedOption).

      | Update Item > Set Phone Call Returned to Yes

    The issue i'm having is it's combining staff from multiple items.
    In the first image below, for item "Test 4th input", it emailed 5 recipients. 

    But the SharePoint list only has 2, as shown in the 2nd image.

    1st image

    tmaloney3_0-1664410140745.png

    2nd image

    tmaloney3_1-1664410220423.png

     

    I need the concurrency to send the email with options, otherwise they get stuck withing for a response from the first person before the second email goes out.

     

    But the concurrency is causing it to join all of the reminder recipients together I think.

     

    These are the 3 SP list items i'm testing with. 

    5 total recipients over 3 different items.

    tmaloney3_2-1664410523866.png

    I don't know the best way to make this work.

     

    Hopefully this makes sense.

  • v-liwei-msft Profile Picture
    on at
    Re: [HELP] Flow to send email to multiple SP items, that include multiple email recipients

    Hi @tmaloney3 

     

    Sincere apologies for the late reply, I'm sorry I didn't understand your intention.

    Could you explain the following to me again? 

    Thank you!

     

    Best Regards,

    Levi

  • tmaloney3 Profile Picture
    4 on at
    Re: [HELP] Flow to send email to multiple SP items, that include multiple email recipients

    Hi Levi, 

     

    Thanks for this solution! Testing it separately it works. 

    However, when I implement it into my flow it fails to do what I need.

     

    I forgot to mention previously that I use an Email with Options step, that follows up with a Switch after the staff member selects the option, it flags the item as Call Returned = Yes.

    I need to have concurrency turned on for the Apply to Each step otherwise it sends out 1 email, and doesn't send out anymore until the first person has clicked on the Option.
    It's also doing the double up on recipients with this, which I assume the concurrency is causing this.

     

    Anyway to tweak your solution to work with this?

    tmaloney3_0-1663285604770.png

    tmaloney3_1-1663285684689.png

    tmaloney3_2-1663285801522.png

  • v-liwei-msft Profile Picture
    on at
    Re: [HELP] Flow to send email to multiple SP items, that include multiple email recipients

    Hi @tmaloney3 

     

    After appending the variable you need to empty the variable to avoid repeated emails. 

    You can create another variable to empty your array variable. 

    I have made a test for your reference(Here I use string variable):

    vliweimsft_0-1663228950435.jpeg

    vliweimsft_1-1663228960625.jpeg

    vliweimsft_2-1663228974710.png

    vliweimsft_3-1663228985820.png

    vliweimsft_4-1663229000919.png

     

     

    Best Regards,

    Levi

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow