web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Find manager for multi...
Power Automate
Answered

Find manager for multiple users

(0) ShareShare
ReportReport
Posted on by 76

Hi everyone,

 

I have a SharePoint list connected to a power app, when a user submits the form, they enter a user/users into a person field. I need to send an email to the users manager. I am able to do this for single users. However the issue is when there are multiple people. I need to be able to send an email to all the users managers submitted on the same form.

 

Hopefully this is possible as I have tried to mess around with it but can't seem to find a solution.

 

Your help is much appreciated. 

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Georgia12 

    According to your description, you want to find the Managers based on multiple persons in your SharePoint Column.

    This is my SharePoint list:

    vyueyunmsft_1-1701068056719.png

     

    This is my test flow:

    vyueyunmsft_0-1701068022167.png

    (1)The first two actions:

    vyueyunmsft_2-1701068077565.png

    (2)The Apply to each2 action:

    vyueyunmsft_3-1701068205628.png

    items('Apply_to_each')?['Email']
    union(variables('Managers'),variables('Managers')) 
     
    Then we can get each row's Managers based on the multiple people in our variable.
     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

     

  • GGC21 Profile Picture
    76 on at

    Hi @v-yueyun-msft ,

     

    Thanks so much for your quick reply.

     

    I have copied the above into my flow, however as my trigger is when an item is created I do not have the value dynamic content for my first apply to all. 

     

    Secondly would my send an email sit in the apply to each 2 under the compose action?

     

    Thanks

    Georgia12_0-1701069219254.png

     

     

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Georgia12 

    If this , you just need to loop your ColumnName in Apply to each:

    vyueyunmsft_0-1701069608900.png

     

    Secondly would my send an email sit in the apply to each 2 under the compose action?

    If you use the when an item is created , you just need to use the variable to get the Managers even though in the out of Apply to each.

     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you.


    Best Regards,

    Yueyun Zhang

     

     

  • GGC21 Profile Picture
    76 on at

    Hi @v-yueyun-msft,

     

    I have followed all of the above steps however I get this error when the flow runs:

     

    ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/ColleagueName/Email']' is of type 'Null'. The result must be a valid array.

     

    Georgia12_0-1701220114194.png

    Georgia12_1-1701220179062.png

    Here is the flow for your reference

     

    Thanks

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Georgia12 

    According to your error code , it means you pass the Null in the Apply to each loop items.

    You are using the When a item is created trigger , so you do not use two "Apply to each" actions:

     

    vyueyunmsft_0-1701228369362.png

    My column name is "Prople".

    And then in your "Get Manager" action.

    You need to replace it with  :

    item()?['Email']

    vyueyunmsft_1-1701228414756.png

     

    Best Regards,

    Yueyun Zhang

     

  • GGC21 Profile Picture
    76 on at

    Hi @v-yueyun-msft 

     

    I am just a little confused as I don't have that simple option when selecting the people column, for me it is called colleague name. I have these options to select:

    Georgia12_0-1701229531517.png

     

    The Colleague Name column is a person column which allows multiple selections

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Georgia12 

    You can see the run history and check the output of your trigger, We need to loop this :

    vyueyunmsft_1-1701235126490.png

     

     

    vyueyunmsft_0-1701235092463.png

     

     

    Best Regards,

    Yueyun Zhang

  • GGC21 Profile Picture
    76 on at

    Hi @v-yueyun-msft ,

     

    Thank you very much, that part of the flow is now working. I now am adding the send an email OUTSIDE of the apply to each however there is no 'compose' dynamic content, rather a 'current item'. I have attached a screenshot below.

    Georgia12_0-1701236303097.png

     

    I am unable to put the current item in the to of the send an email 

     

    Thanks so much 

  • GGC21 Profile Picture
    76 on at

    @v-yueyun-msft 

     

    I have also just run it in the apply to each and got this error:

    The 'inputs.parameters' of workflow operation 'Send_an_email_(V2)' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'emailMessage/To' is required to be of type 'String/email'. The source type/format 'Array' of the value '["Jo.Jo@email.com"]' is not convertible to type/format 'String/email'.

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @Georgia12 

    You could not use the Compose ,you can just use the expression in your send email action:

    vyueyunmsft_0-1701236717943.png

     

     

    Best Regards,

    Yueyun Zhang

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard