cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JAF
Level: Powered On

Email the assigned for the upcoming week

Hi,

We have a list in SharePoint where each worker has a week with kitchen duties. I want a workflow to notify the person who has the next week, by email. In the list we have week number, from date, to date and assigned to. 

I want the workflow to send a email on Friday 3 days before the upcomming week. 

 

Example:

If i have kitchen duty in week 25, I want a email saying "You have kitchen duty next week!" on Friday week 24. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Email the assigned for the upcoming week

Hi @JAF,

 

Could you please share a bit more about your SharePoint list?

Does the Week number column store all weeks number of a year within your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:8.JPG

Note: The Week number column store all week numbers of this year, current week is week 11 of this year. The From date and To date column are both date type column. The Assigned to column is a Person or Group type column.

 

If the Week number column store all weeks number of a year within your SharePoint list, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Week, On these days field set to Friday.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['Week_x0020_number'], add(int(div(dayOfYear(utcNow()), 7)), 1))
  • Add a "Apply to each" action, input parameter set to output of "Filter array" action.
  • Within "Apply to each" action, add a "Send an email" action, To field set to following formula:
item()?['Assigned_x0020_to']?['Email']

Image reference:9.JPG

 

10.JPG

The flow works successfully as below:11.JPG

 

 

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

 

In addition, you could also take a try with the following workaround:12.JPG

Within Condition box of "Filter array" action, type the following formula:

@and(equals(formatDateTime(addDays(utcNow(), 3), 'MM/dd/yyyy'), formatDateTime(item()?['From_x0020_date'], 'MM/dd/yyyy')),equals(formatDateTime(addDays(utcNow(), 9), 'MM/dd/yyyy'), formatDateTime(item()?['To_x0020_date'], 'MM/dd/yyyy')))

 

 

Best regards,

Kris

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

1 REPLY 1
Community Support Team
Community Support Team

Re: Email the assigned for the upcoming week

Hi @JAF,

 

Could you please share a bit more about your SharePoint list?

Does the Week number column store all weeks number of a year within your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:8.JPG

Note: The Week number column store all week numbers of this year, current week is week 11 of this year. The From date and To date column are both date type column. The Assigned to column is a Person or Group type column.

 

If the Week number column store all weeks number of a year within your SharePoint list, please take a try with the following workaround:

  • Add a Recurrence trigger, Interval set to 1 and Frequency set to Week, On these days field set to Friday.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
@equals(item()?['Week_x0020_number'], add(int(div(dayOfYear(utcNow()), 7)), 1))
  • Add a "Apply to each" action, input parameter set to output of "Filter array" action.
  • Within "Apply to each" action, add a "Send an email" action, To field set to following formula:
item()?['Assigned_x0020_to']?['Email']

Image reference:9.JPG

 

10.JPG

The flow works successfully as below:11.JPG

 

 

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

 

In addition, you could also take a try with the following workaround:12.JPG

Within Condition box of "Filter array" action, type the following formula:

@and(equals(formatDateTime(addDays(utcNow(), 3), 'MM/dd/yyyy'), formatDateTime(item()?['From_x0020_date'], 'MM/dd/yyyy')),equals(formatDateTime(addDays(utcNow(), 9), 'MM/dd/yyyy'), formatDateTime(item()?['To_x0020_date'], 'MM/dd/yyyy')))

 

 

Best regards,

Kris

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 175 members 5,662 guests
Please welcome our newest community members: