cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Flow to send email to a "value" person from another sharepoint list

I have 2 sharepoint lists for an onboarding process. The HR manager should select which kind of software / access a new user should get.

 

1) Users with

firstname, secondname, department, software (multiple options from sharepoint list 2 software <-> software.title)

 

2) Software with

title, manager (Person field)

 

When a new user is added, all software managers should receive an email to create a account.

 

Any hints?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow to send email to a "value" person from another sharepoint list

Hi @rbrecht ,

If you want to use Power Automate flow to achieve your needs, please consider take a try with the following flow's configuration:

2.JPG

 

3.JPG

Within the "Get items" action, set the Filter Query field to following:

Title eq '@{items('Apply_to_each')?['Value']}'

Note: The 'Software Value' dynamic content should be wrapped with single quote.

 

Within the "Send an email (V2)" action, set the To field to following:

first(body('Get_items')?['value'])?['Manager']?['Email']

within the Body field, type the following formula:

first(body('Get_items')?['value'])?['Manager']?['DisplayName']

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Flow to send email to a "value" person from another sharepoint list

Hi @rbrecht ,

Is the Software field a Multiple Choice type column or LookUp type column (enabled "Allow multiple selections") in your Users List?

How do you add your new user entry? Through PowerApps canvas app?

Further, do you want to send emails to corresponding managers related to the selected Software using Power Automate flow?

 

Based on the needs that you mentioned, I think it is not necessary to achieve your needs using Power Automate flow, instead, I think you could achieve your needs within your canvas app directly.

 

I assume that you submit your canvas app form data to create a new user entry, right? Please set the OnSuccess property of the Edit form (EditForm1) to following:

Office365Outlook.SendEmail(
                         Concat(
                            ForAll(
                                   EditForm1.LastSubmit.Software, // Software represents the Choice or LookUp column in your Users List
                                   LookUp('Software List', Title = Value, Manager.Email) // retrieve the corresponding manager email based on each selected software option
                            ),
                            Value & ";"
                         ),
                         "Account Creation Notification", 
                         "Hi Guys, please create account for this user: " & EditForm1.LastSubmit.firstname & " " & EditForm1.LastSubmit.secondname & "<br/>The Item Link as below <br/>" & EditForm1.LastSubmit.'Link to item',
                         {
                            IsHtml:true
                         }
)

Note: You need to add Office 365 Outlook connection in your app firstly.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: Flow to send email to a "value" person from another sharepoint list

Hi there, 

 

Yes, it is a "LookUp type" column (enabled "Allow multiple selections") in my users list.

I will add new users manually into the list and yes, I want to send emails to corresponding managers related to the selected Software using Power Automate flow.

 

I did not plan to use a canvas app for this.

 

kindly regards

Highlighted
Community Support
Community Support

Re: Flow to send email to a "value" person from another sharepoint list

Hi @rbrecht ,

If you want to use Power Automate flow to achieve your needs, please consider take a try with the following flow's configuration:

2.JPG

 

3.JPG

Within the "Get items" action, set the Filter Query field to following:

Title eq '@{items('Apply_to_each')?['Value']}'

Note: The 'Software Value' dynamic content should be wrapped with single quote.

 

Within the "Send an email (V2)" action, set the To field to following:

first(body('Get_items')?['value'])?['Manager']?['Email']

within the Body field, type the following formula:

first(body('Get_items')?['value'])?['Manager']?['DisplayName']

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,295)