Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
 View Only
  • 1.  Get Emails from SharePoint List Lookup Multi Person Column Power Automate

    Gold Contributor
    Posted Feb 08, 2022 05:08 AM
    Hello,
    I'm trying to capture the email addresses from a SharePoint List Lookup multi-person column in order to send emails and/or Approval actions to the recipients in Power Automate. My Flow is works until I get to the Select statement where I'm trying to extract just the email addresses.

    Flow Triggered when Item is created

    Actions Include:
    Initialize Array variable named "varApprovalGroup"
    Get Items from the Source List which has a Filter Query that only returns the item I need
    Get Items from the Lookup List which includes a Filter Query that limits the action to the ID of the Lookup Column named "Approval Group"
    Append to Array Variable sets "varApprovalGroup" with the Value from "Approval Group" field
    Select Action. From: "varApprovalGroup". Maps to item / Approval Group.  The output of that contains all sorts of properties of the multi-person lookup field, including "Email".

    This is where I'm stuck trying to get just the email addresses which I then thought I could put in a 'Join' statement to populate the Approval Email To field. My thought was that I need another Select action that outputs the emails, but I'm not sure what to enter as the Map values and nothing I've tried has worked. For instance, choosing the Approval Group Email value results in another apply to each of the Current item and ends up failing because it's not an Array.

    Thoughts?

    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------


  • 2.  RE: Get Emails from SharePoint List Lookup Multi Person Column Power Automate

    Top Contributor
    Posted Feb 09, 2022 08:54 AM
    Without tinkering with this directly, I think the problem you are running into is multi person field is an array within the array of get items... The way I typically tackle the multi-person field is I let the apply to each happen for the field, and either append to a string variable, or set depending on whether or not I need to capture all the values or just one. By appending to a string variable, it usually allows that variable to then be used in the "send to" or "Assign To" fields without issue, as at runtime it resolves the email against the active directory. So your append to variable would be something like {assignedgroup.email}so each email address is appended to the previous with a semicolon in between. At the end of the apply to each you'll have one string with all the required email addresses grouped together.

    ------------------------------
    Sam Duval
    Data Quality Analyst
    Element Financial
    Indianapolis IN
    ------------------------------



  • 3.  RE: Get Emails from SharePoint List Lookup Multi Person Column Power Automate

    Gold Contributor
    Posted Feb 09, 2022 04:42 PM
      |   view attached
    Thank you @Sam Duval!! With your guidance, I was able to solve my issue. Attached screen shot with steps.​

    ------------------------------
    Beth Beck
    O365 Business Analyst
    Fort Myers FL
    ------------------------------