Skip to main content

Notifications

Community site session details

Community site session details

Session Id : A1pY8znOWYTz/0M/G9clSK
Power Automate - General Discussion
Answered

how to extract email address from a sharepoint person or group column that allows multiple selection

Like (1) ShareShare
ReportReport
Posted on 12 Jun 2018 20:09:01 by

Hi, I have a SharePoint list named 'Systems' it has a Titlle field and a field called 'SustemMaintainer'.  'SystemMaintaiiner is  a 'Person Or Group' columns that allows multiple selections and people only.

 

In my flow I got the correct row by calling getItems and filtering based on the title column. so I have an array with one row, and that row has an a  column that contains an array of people columns:

[
 {
 "Claims": "i:0#.f|membership|russell.gove@xx.com",
 "DisplayName": "Gove, Russell",
 "Email": "Russell.xx@xx.com",
 "Picture": "https://xx.sharepoint.com/sites/GLMasterData/_layouts/15/UserPhoto.aspx?Size=L&AccountName=Russell.Gove@tronox.com",
 "Department": "Infrastructure Services",
 "JobTitle": "Sr SharePoint Architect"
 },
 {
 "Claims": "i:0#.f|membership|xx.xx@xx.com",
 "DisplayName": "xx, xx",
 "Email": "John.xx@xx.com",
 "Picture": "https://xx.sharepoint.com/sites/GLMasterData/_layouts/15/UserPhoto.aspx?Size=L&AccountName=John.Njoroge@tronox.com",
 "Department": "CFO Staff",
 "JobTitle": "Manager Accounting Analysis"
 }
]

How do I go about sending an email to the  Email addresses in that array.

The expression 

 

body('getItems')?['Value']?[0]?['SystemMaintainer']]

gets me the list of objects,  But how do i extract the email addresses from thos objects in a format thats sutable for sending an email?

Categories:
  • Suggested answer
    David_MA Profile Picture
    10,800 Super User 2025 Season 1 on 14 Aug 2024 at 16:07:51
    how to extract email address from a sharepoint person or group column that allows multiple selection
    I don't think this has been answered. It sounds like you want to send one e-mail to the people from a people field that allows multiple people. If so, do the following:
    1. Create a string variable at the beginning of the flow. You could name it Emails.
    2. Add an Apply to each action and set the output value to the people field (the one in the dynamic content that does not have email after its name).
    3. In the Apply to each action add an Append to string variable action and set it to the variable you created in step 1, and set the value to the people field that contains email in its value and manually add a semicolon and space after the dynamic value.
    4. Use the variable in the e-mail action.
  • Suggested answer
    bm_data Profile Picture
    28 on 12 Aug 2024 at 20:16:00
    how to extract email address from a sharepoint person or group column that allows multiple selection
    I started down the path of using this solution's answer, but came across a much easier solution, for my case at least.
     
    I have a form that is being written to a list. When the form is submitted, I am using "Get items" to see if this particular user has submitted this form prior. I then have a increment variable to tally the number and ultimately write to a new row on the list.
     
    So, after my 'Get_items" action I have an "Apply to each" action using {outputs('Get_items')?['body/value']} to compare:
    @items('Apply_to_each')?['Submitter']?['Email'] to @outputs('Get_response_details')?['body/responder']
     
    I hope this helps someone else!
  • roxy1 Profile Picture
    195 on 31 Jan 2024 at 00:38:26
    Re: how to extract email address from a sharepoint person or group column that allows multiple selec

    Hi,

    If anyone is still active on this thread, I followed the above instructions but there is an error when it gets to the 'select email address' action - it says "The 'from' property value in the 'select' action inputs is of type 'Object'. The value must be an array'. My column type is a person or group, allowing selection of person only. Note: I have tried the expression starting with 'first' as well as the one below.

     

    roxy1_0-1706661463408.pngroxy1_1-1706661496195.png

     

  • Thomas79 Profile Picture
    4 on 18 Nov 2022 at 18:53:23
    Re: how to extract email address from a sharepoint person or group column that allows multiple selection

    @faustocapellanj could this solution of getting emails as an output be used to set item level permissions for a SharePoint list item using that specific flow control? Forgot the actual name of it, just know it is there.

    I.e. run a flow that (1) stops inheriting permissions on an item (2) gets the user emails from a [permission field] (just standard user/group field with multiple values) and then (3) use those emails to set the EDIT permissions for the item

     

    Cheers and thanks, this was a good thread to read up on.

  • CarlHRVA Profile Picture
    601 on 25 Jul 2022 at 14:31:01
    Re: how to extract email address from a sharepoint person or group column that allows multiple selection

    Instead of leaving the Key blank, press this button and enter the formula there with no key. 

    CarlHRVA_2-1658759322996.pngCarlHRVA_3-1658759367507.png

     


    The result will look like the below.

     

    CarlHRVA_1-1658759203513.png

    From there use the Join action from Data Operations. Use the output of your select as the "From" and the semi-colon to join them.

    CarlHRVA_4-1658759433261.png


    If you are still having trouble please consider opening a new thread and tagging me if you need more help.

    Thanks,

    Carl

     

  • Community Power Platform Member Profile Picture
    on 25 Jul 2022 at 13:14:38
    Re: how to extract email address from a sharepoint person or group column that allows multiple selection

    Sorry to bring up an old thread. I really cannot figure out how to do this. 

     

    I need to get the email addresss from a sharepoint person or group column that allow multiple selection.

    I need the emails because I need to perform an action "Grant access to an item or a folder" and the recipient must be email addresses.

     

    I followed what is mentioned in 2019. However the "Select" action is changed. I tried it myself and I can get a Json respond like:

    [
    {
    "": "email1@abc.com"
    },
    {
    "": "email2@abc.com"
    }
    ]

     

    How can I convert above format into email1@abc.com;email2@abc.com;?

     

    Colchester_0-1658754635265.png

     

  • AbdelArc-One Profile Picture
    4 on 02 Jun 2022 at 17:27:04
    Re: how to extract email address from a sharepoint person or group column that allows multiple selec

    This works for me but with one issue. Its only grabbing the first two emails from my sharepoint column? 

     

    How can I make it grab all of them? A loop wont work for my use case. I am writing to an excel row which I'm using to add members to a group via powershell.

  • Jolinchang Profile Picture
    6 on 07 Apr 2022 at 10:58:19
    Re: how to extract email address from a sharepoint person or group column that allows multiple selection

    Hi  @faustocapellanj good day

    when "select" named "get mail" step, shows error as below after run, but the output from "get items" is not Null.

    "The 'from' property value in the 'select' action inputs is of type 'Null'. The value must be an array."

    any ideas, thanks so much

     

    Jolinchang_2-1649328921051.png

     

    Jolinchang_1-1649328767610.png

    Jolinchang_3-1649329053430.png

     

     

     

  • MattWearmouth Profile Picture
    20 on 09 Feb 2022 at 23:35:24
    Re: how to extract email address from a sharepoint person or group column that allows multiple selec

    Resolved! 

    MattWearmouth_0-1644449659360.png

    items('Apply_to_each')?['actionWith0']

     

    item()?['Email']"}]

     

  • MattWearmouth Profile Picture
    20 on 09 Feb 2022 at 19:47:07
    Re: how to extract email address from a sharepoint person or group column that allows multiple selec

    Still not getting this work work. Getting this error for the 'Select' operation

    MattWearmouth_0-1644435999667.png

     

    MattWearmouth_1-1644436009757.png

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 4 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 2 Super User 2025 Season 1

Overall leaderboard