cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
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 blog

Power Automate Video Tutorials
Highlighted
Super User
Super User

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
Highlighted
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

Highlighted
Frequent Visitor

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

Highlighted

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

Highlighted

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

Highlighted

@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
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.

Top Solution Authors
Top Kudoed Authors
Users online (12,662)