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

Send notitfication when due dates are within next 30 days

Hi all

 

Im doing scheduled flow to notify a user of the items that are due within the next 30 days based on the column called Due date FSSC 22000

 

The formula in order to send the notification is:

duedate.PNG

 

In other words, if the due date - today() is less or equal to 30 days, then notify. If the due date is blank or due date - today() is over 30 days then do not notify.

 

The email (and expected result) I would like to have sent is:

 

notify2.PNG

 

So far my flow looks like this:

 

flow recurrence.PNG

 

I attach the raw data.

 

https://1drv.ms/x/s!ApgeWwGTKtFdhkLV0H1zEptJNdxO?e=PUhePd

 

Can you please advise how to build the flow?

 

Thanks all.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Send notitfication when due dates are within next 30 days

 

Hi @diegoandre10 ,

 

Try to create HTML table and send by email:

68.PNG69.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

Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

Hi @v-bacao-msft 

 

I am getting closer to the solution. I received an email with the matrix of companies, however not all the ones that met the criteria were shown. Only 21 out of the 36 that met the criteria appeared on my email.

 

 

Here are the steps, let me know if there is something wrong:

 

 

1.0.PNG

 

2.0.PNG

 

 

3.0.PNG

 

I attach the dataset of total companies with the due date included. From 208 rows a total of 36 should meet the condition we defined.

 

https://1drv.ms/x/s!ApgeWwGTKtFdhkPdPd2wNt9-ORc_?e=TXBnPm

 

Thanks a lot!

 

 

 

 

 

View solution in original post

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: Send notitfication when due dates are within next 30 days

Hello @diegoandre10 

 

Try using the addDays() expression to todays date which can be used as utcNow() and than in your get items SharePoint , filter on the output of the addDays()

 

Example:

pic2.png

 

addDays(utcNow(),30,'dd/MM/yyyy')

 

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

 





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

Hi @Jcook 


Where should I include the column Due Date that will be the reference to subtract the 30 days?

 

And the email with the companies that meet the criteria?

 

Thanks. 

Community Support
Community Support

Re: Send notitfication when due dates are within next 30 days

 

Hi @diegoandre10 ,

 

Please try this configuration:

45.PNG

Hope this 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.
Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

hi @v-bacao-msft 

 

Looks ok the condition of null and utc now. 

 

But for the for the company it should not be a "static value or equal to something" within the condition

 

The output should be:

 

Give me all the company's that meet the condition of being due within the next 30 days. So this will vary on a day by day.

 

So I was thinking of some sort of matrix that says on the output email:

 

"The following companys are overdue already or due within the next 30 days"

 

CompanyDue date FSSC 22000
2224/1/2020
4444/1/2020
5552/1/2020
6663/1/2020
31081/1/2020
36634/1/2020
38858/1/2018
62163/1/2020
63273/1/2020
64381/1/2020
677112/18/2019
68821/1/2020

 

Can you please help me? Please have a look on the dataset that contains the sample I shared on my post.

 

Thanks.

Highlighted
Community Support
Community Support

Re: Send notitfication when due dates are within next 30 days

 

Hi @diegoandre10 ,

 

Try to create HTML table and send by email:

68.PNG69.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

Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

Hi @v-bacao-msft 

 

I am getting closer to the solution. I received an email with the matrix of companies, however not all the ones that met the criteria were shown. Only 21 out of the 36 that met the criteria appeared on my email.

 

 

Here are the steps, let me know if there is something wrong:

 

 

1.0.PNG

 

2.0.PNG

 

 

3.0.PNG

 

I attach the dataset of total companies with the due date included. From 208 rows a total of 36 should meet the condition we defined.

 

https://1drv.ms/x/s!ApgeWwGTKtFdhkPdPd2wNt9-ORc_?e=TXBnPm

 

Thanks a lot!

 

 

 

 

 

View solution in original post

Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

hi @v-bacao-msft 

 

I think i found part of the problem, when i run and test the flow: 

 

I see only 100 items:

 

duedate.PNG

 

Could this be part of the problem?

 

I have 208 records.

 

Thanks.

Highlighted
Helper V
Helper V

Re: Send notitfication when due dates are within next 30 days

For the record

 

I changed the threshold to 1000 and it worked!

 

get_items.PNG

Highlighted
Super User III
Super User III

Re: Send notitfication when due dates are within next 30 days

@diegoandre10 

Great catch!  Everyone should remember that, by default, the SharePoint Get Items action returns only 100 rows.  You can set it up to a maximum of 5000 (in most cases).  If you have more than 5000 items in your list, use OData filter queries to filter the data before you get it.

 

 

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

Re: Send notitfication when due dates are within next 30 days

Thank you @ScottShearer and @v-bacao-msft  !

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.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (6,284)