Hi.
I have been tasked with making a scheduled flow. This flow will run each day at 9am.
I have a sharepoint list, with a column called 'Review date'. I want to make it so that the email reminder will include all items with a review date within the next 5 days.
For example, we have 3 items, one with an RD on the 31st March, two with an RD on the 1st April, and three with an RD on the 2nd April.
If the flow were to run today, it'll show; Item 1: Name, ID, review date, Link. (Same for item 2 and 3).
Is a scheduled flow like this possible?
Thank you for your help in advance.
Solved! Go to Solution.
You should use a Recurrence trigger and configure it to run at 9:00 AM each day.
To retrieve only items that have a review date within 5 days, you'll want to use a Filter Query - click on "Show advanced options" to see the Filter query text box.
Your filter query should look something like this:
Please note that ReviewDate is the internal name of the Review Date column - your internal name might be different.
Additional info on OData filter queries can be found here.
You should use a Recurrence trigger and configure it to run at 9:00 AM each day.
To retrieve only items that have a review date within 5 days, you'll want to use a Filter Query - click on "Show advanced options" to see the Filter query text box.
Your filter query should look something like this:
Please note that ReviewDate is the internal name of the Review Date column - your internal name might be different.
Additional info on OData filter queries can be found here.
Thank you!
It works well, but I noticed that items with a review date that is today (e.g. 1st April) aren't included, only items in the next 5 days. Is there a way to adjust the code to include items on the day?
Ah no worries, I figured it out!
For those wondering, in the filter query, replace 'gt' with 'ge'.
Use this website here for reference on filter queries: https://diyd365.com/2019/11/20/every-power-automate-ms-flow-filter-query-you-ever-wanted-to-know-as-...
The site connection says it is not secure however, so enter at your own risk.
Good catch!
Also, here is a link to a really good explanation of using OData filters with SharePoint lists (including the use of gt, ge, lt, eq, etc.)
Thanks for all the help.
I've just been in a call regarding this flow, and they wondered if its possible to get retrieve these items ordered by date?
I currently take the data from the filter, and place them into a html table. The html table is inserted into an email and sent to all appropriate users.
To retrieve the items by date, use the Order By feature in the Get items action - see my example above.
Your order by expression miight look something like this:
MyDate asc or MyDate desc
Where MyDate is the internal name of the date column
Also, please note that the Get items action returns only 100 items by default - to change this go to settings for the action, turn on pagination and enter a number of up to 5000 (in most cases).
User | Count |
---|---|
23 | |
15 | |
14 | |
10 | |
9 |
User | Count |
---|---|
45 | |
29 | |
25 | |
24 | |
22 |