cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Scheduled flow: Show item information in email depending on their date column

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Scheduled flow: Show item information in email depending on their date column

@Alfie_Smith 

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:

ReviewDate1.jpg

 

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.

 

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

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Scheduled flow: Show item information in email depending on their date column

@Alfie_Smith 

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:

ReviewDate1.jpg

 

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.

 

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
Helper I
Helper I

Re: Scheduled flow: Show item information in email depending on their date column

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?

Highlighted
Helper I
Helper I

Re: Scheduled flow: Show item information in email depending on their date column

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. 

Highlighted
Super User III
Super User III

Re: Scheduled flow: Show item information in email depending on their date column

@Alfie_Smith 

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

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Helper I
Helper I

Re: Scheduled flow: Show item information in email depending on their date column

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. 

 

examplescheduledflow.PNG

Highlighted
Super User III
Super User III

Re: Scheduled flow: Show item information in email depending on their date column

@Alfie_Smith 

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

 

 

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.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (5,270)