cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Sending email to filtered group of people from Sharepoint list

So to set the issue: 

 

we have a Sharepoint list which is used to show who is on duty for next week. That is usually a total of 20 people.

we have the collumns weekno to use. Also is on the list a look up field connected to the person to show email, telephone etc. 

 

What i would like to do is to send a email on Thursday to all the people who are on duty next week. 

So it needs to check for next week and based on that selection pick the email adresses from those selection to email them with the message..

 

Bonus points to send them a certain view from that list...

 

I just cant get it to work.. 

 

Attached what i have made so far (sorry for Dutch) and the list in question2019-06-07_1301.png2019-06-07_1309.png

 

Thanks in advance! 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Hi @RicoSing ,

 

Please refer to the following method to configure Flow.

I created two fields, WeekNumber and Email, of type Number and single line of text.

 

  • First use the following formula to calculate WeekNumber for the next week:
add(If(greater(div(float(dayOfYear(utcNow())),7),div(dayOfYear(utcNow()),7)),add(div(dayOfYear(utcNow()),7),1),div(dayOfYear(utcNow()),7)),1)
  • Configure Filter Query to filter out the items whose WeekNumber matches the condition.
  • Initialize the variable and append the email contained in the eligible items to the variable.
  • Finally, configure the Html table and Send email action, we need to set the Is html field to Yes.

 

Image reference:

1.PNG2.PNG3.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

Hi @RicoSing ,

 

Please check this:

21.PNG

 

Best Regards,

Community Support Team _ Barry
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

5 REPLIES 5
Community Support
Community Support

Hi @RicoSing ,

 

You could try to filter out the eligible items using Filter array and the following Expression.

If(greater(div(float(dayOfYear(utcNow())),7),div(dayOfYear(utcNow()),7)),add(div(dayOfYear(utcNow()),7),1),div(dayOfYear(utcNow()),7))

Best Regards,

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

Hi @RicoSing ,

 

Please refer to the following method to configure Flow.

I created two fields, WeekNumber and Email, of type Number and single line of text.

 

  • First use the following formula to calculate WeekNumber for the next week:
add(If(greater(div(float(dayOfYear(utcNow())),7),div(dayOfYear(utcNow()),7)),add(div(dayOfYear(utcNow()),7),1),div(dayOfYear(utcNow()),7)),1)
  • Configure Filter Query to filter out the items whose WeekNumber matches the condition.
  • Initialize the variable and append the email contained in the eligible items to the variable.
  • Finally, configure the Html table and Send email action, we need to set the Is html field to Yes.

 

Image reference:

1.PNG2.PNG3.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

Thanks! This looks almost the same as I had. Thanks allready for the input.

 

It completly follows the flow till the last step. 😞

 

What happens is that is puts all the fetched emailadresses in 1 long string, without seperators. Any solution to this?

 

Knipsel5.PNG

Hi @RicoSing ,

 

Please check this:

21.PNG

 

Best Regards,

Community Support Team _ Barry
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

Man I feel dumb... should have seen that!

 

/bow!

 

Thank you for the great help! Its a great tool to use, and I feel like I'll be using this a lot more in the coming weeks/months!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (8,808)