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 / Sending unique summary...
Power Automate
Unanswered

Sending unique summary email to list with multi person field

(0) ShareShare
ReportReport
Posted on by

I've been slamming my head on the desk trying to build a flow that will gather all tasks for a user that is in a multi person field. 
I've attempted with variables, but the JSON I'm using doesn't seem to pull out the right information and it's causing an error in the Compose section. 
I start with Get Items, initialize an Array variable and then run a select, mapping the OwnerName. I append those to the array variable and run a union  on the variable. Parse the JSON and >BAM< broken. 

I think I'm missing a step somewhere. 

Or I'm just doing it completely wrong... 

 

Any help would be appreciated.

Categories:
I have the same question (0)
  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @Luckey 

     

    Do you have sample input data and an expected output?

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Luckey ,

    'Select' won't work as 'Select' will just create another array with the emails and you end up with an array of arrays. But you can use a loop to extract all the single users in those multiple people picker fields and continue from there as I explained in this blog post.

  • Luckey Profile Picture
    on at

    Sure:
    Here's the Sharepoint List I'm pulling from. The ITOwnerName is a people picker with multi 
    image001.png

     

    Here's the flow so far. 
    image002.pngimage004.pngimage005.png

     

    I'm wanting to be able to send the ITOwner an email with their AssetName  and status. 

    I have tried assembling a Table to see any output. But I either get blank table or errors

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @tom_riha 

     

    I just skimmed your blog. Is it really necessary to create a loop inside a loop for this? Can you pass me some sample data and the expected output? Normally loops inside loops are very slow and should be avoided if possible.

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @Luckey 

     

    It would be much more easier with sample data but I hope you can make it from here. All you have to do is to change some fieldnames I guess. You could skip the Select action but the xpath expression would be more difficult.

     

    Matthy79_0-1678046897978.png

     

  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @Matthy79 ,

    that's an interesting solution with the xpath, thank you for sharing, I was going through the simplest way possible even though it might take longer to run.

    I'd just add that you can't send an email to claims login -> you must replace the  i:0#.f|membership| string in the To field before sending the email.

  • Luckey Profile Picture
    on at

    Thanks. I actually built most of what I did on your solution. (You have some fantastic stuff there. Thank you for your education.) 
    For some reason, when I use your solution, it will spit out each AssetName, but paired all of the found email addresses, not the ones that are actually assigned. 


  • Luckey Profile Picture
    on at

    When I use this flow, it goes by super quick. But the Filter Array has no data at all. I think that's because the ITOwnerName "contains" Current Item won't find anything. 

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    In the sample the filter formular is "@contains(item()?['ITOwnerName#Claims'], items('Apply_to_each'))"

     

    @tom_riha You are right about the email. But in this case it is easy to get the email value from the Claims-Thing. As you said a replace would do it. I think I would use something like "@{last(split(item(), '|'))}"

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

    Hi @Luckey 

     

    I have made a test for your reference:

    1.

    vliweimsft_0-1678086989428.png

    2.

    vliweimsft_1-1678087050805.png

    3.

    vliweimsft_3-1678087188867.png

    4.

    vliweimsft_4-1678087445351.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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard