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 retrieve multip...
Power Automate
Unanswered

How to retrieve multiple person emails from a lookup field in a SharePoint list

(0) ShareShare
ReportReport
Posted on by 2
Hi guys,

I'm new to Power Automate coding, so I couldn't get past this obstacle for a few days.

The use case: Sending a birthday notification email to managers and company directors

Datasource is a large SharePoint list containing information about employees and their direct managers. Who should receive the notification email directly? Each employee works for a different, let us call it a subsidiary. These subsidiaries are defined in a second SharePoint list, and each employee is pointed to a subsidiary via a lookup field in the employee list. For each subsidiary, a set of people is defined in a people field (multiple coyotes possible) to receive the mail notification as cc recipients.

My question is: What is the best practice for retrieving the item information/mail addresses in the people field from the lookup list? Is the people field a good way to solve this at all?

My flow looks like this at the moment:
 
At the moment im stuck with the unique id from the subsidiary list. "Get item mail" second last action. How can I get the unique id from the item through the employee list?
 
 
I'm able to find the id but not the unique id of the field. Or is that the same?
 
Thanks for your support,
Felix
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Using a people field in a SharePoint list is a good way to do what you want. However, if you only want one e-mail to go out, you'll need to do some processing on the people fields that allow multiple people to be selected. If you don't when you add the e-mail address value from the dynamic content to your e-mail, it will put the action into an Apply to each.
     
    For each of the people fields that contain multiple names:
    • Create a string variable to store the names.
    • Next, create an Apply to each action and set the data source for the apply to each action to the people field (not the value that stores the e-mail itself).
    • Add an Append to string variable action to the Apply to each and append the e-mail address of the people field to the applicable variable.
    • Be sure to add a semicolon (;) after the dynamic value.
    • You can then use the variable in the send e-mail action to set the e-mail addresses so only one message is created.
    For example:

  • FB-30071151-0 Profile Picture
    2 on at
    Thank you for your advice!

    What I'm struggling with is getting from List1 - with a lookup field to List2 - to the person field to get emails from List2. I have drawn a small sketch of this:
     
    Do you have any suggestion how I can get this solved?
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    Take the below flow as an example, here I have a list - 
     
     
    Here the subsidiary column is a lookup list to following list as shown below
     
    Here people column is multiple person selection column.
     
    Now let's see how to extarct the people's data corresponding to subsidiary.
     
    In your case you have tried to use Get item - but since you don't have id of subsidiary list beforehand, so you can't try it. Other way would be to use Get items - see below how i have tried it.
     
     
    1. Use Get items to get all employee details present in Tasks list
     
    2. Now loop through each item present in task list as shown below 
     
    • Now use a get items action to get the list of items present in subsidiary list filtered based on value present in subsidiary column of the Tasks list as shown below


       
    • Now the output of above get items would be the items which have subsidiary value equal to a value of item through which it is currently iterating. Now use select action to transform the people data /column present in it in array format using select action 

      Expression - first(outputs('Get_items_2')?['body/value'])?['People']

       
    • Now use a compose action which will join the email obtained as output of select action using delimiter ; as shown below
       
      Hope this helps !
       
      Thanks & Regards,
      Nived N 
      LinkedIn: Nived N's LinkedIn
      YouTube: Nived N's YouTube Channel
      Blog: Nived Nambiar's Blogs

       Found my answer helpful? Please consider marking it as the solution!
       Your appreciation keeps me motivated. Thank you! 

       

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