cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dreaves1
Frequent Visitor

Send email to HR admin on employee's start date

Hi All, 

 

We have a SharePoint list that houses employee information. The SharePoint list has 1600+ items in it. We created a flow that'll send an email to the HR admin associated with the employee on their start date. For some reason when there's two HR admin listed, the flow sends two separate email instead of including both HR admins in the To field of the email. How can I solve this issue? Below is a screenshot of my flow. 

 
 

Flow HR Admin email.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User III
Super User III

@dreaves1 

Please see my example below.  I took the liberty of removing your condition and using a filter query instead - it is a much better way to get specific items from SharePoint.

HR1.jpgHR2.jpgHR3.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

7 REPLIES 7
abm
Super User III
Super User III

Hi @dreaves1 

 

Follows the steps:

 

1. Declare a string variable above Get Items step called Emails.

2. Remove the send an email from the loop.

3. Inside the same loop use append string step to append the emails with a comma. (Note: Here you need to do some string manipulations for adding commas)

4. Finally outside the loop add the Send email and map the To field dynamically using the new string variable Emails.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Rahber
Super User II
Super User II

How are two HR Admins stored in SharePoint list?

Is it the same column or different?

if in same column how are they two separated?

Once i have this information i can tell you better solution
ScottShearer
Super User III
Super User III

@dreaves1 

Please see my example below.  I took the liberty of removing your condition and using a filter query instead - it is a much better way to get specific items from SharePoint.

HR1.jpgHR2.jpgHR3.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

dreaves1
Frequent Visitor

Thank you for your help. Can you add a screenshot regarding step 3? I'm confused to how to complete that part.

dreaves1
Frequent Visitor

The HR admin are stored in a person column that accepts multiple entries.

The filter query condition doesn't work as it is giving me this error message, "Start Date eq '2020-07-10' is not valid". 

@dreaves1 

Filter queries use a SharePoint column's internal name rather than the display name (the name you see).  Internal names never have spaces.  The internal name of the column is probably StartDate rather than Start Date.  If that doesn't work, go to the list settings and click on the column name.  You'll see the internal name at the end of the URL after Field=.

Another way to find the internal name is to run a Get items action with no filter.  Take a look at the output - the column references in the output are the internal names.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (3,540)