
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.
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:
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:
@equals(item()?['Week_x0020_number'], add(int(div(dayOfYear(utcNow()), 7)), 1))
item()?['Assigned_x0020_to']?['Email']
Image reference:
The flow works successfully as below:
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:
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