How to send alerts dynamically, based on expiry date

2020-12-15T19:09:52.973+00:00

Solution Required:
i want to send alert using email in advance based on expiry date

Suppose : if 30 days left 1 alerts in a day ,on 20 days , 2 alerts in a day and on 10 days 3 alerts in a day like this

I know simple recurrence flow using Microsoft flow but it gets fixed like 1 in a day or 2 in a day,
How can I make it dynamic basic on days left.

I have a custom list having expiry date column , wants to send alerts on it ( 30days earlier )

Thanks

Microsoft 365 and Office | SharePoint Server | Development
{count} votes

1 answer

Sort by: Most helpful
  1. Jerry Xu-MSFT 7,961 Reputation points
    2020-12-16T02:24:43.197+00:00

    Hi, @Qasim Rana (IT Manager - Development) ,

    As you have known that a recurrence flow will work for a certain period. So for your requirements, you can create different flows for certain period, using a condition to handle the mechanism.

    As for your example, we can create 3 flows, each works for 30 days, 20 days, and 10 days. You can set all the flows to get triggered 1, 2 or 3 times a day. Then add an condition for each of them. If we have 30 days left, only the first flow will go to the Yes branch and send the email notification, and when 20 days left, only the second flow will go to the Yes branch.

    Update:

    48637-image.png

    Here is a flow which will run every 12 hours, which means twice a day. It will get all the items in the list, check the due date with the criteria you require. And then you can add other actions in the branch you need.

    The expression is formatDateTime(adddays(utcnow(),20),'yyyy-MM-dd') , which provides the date of 20 days plus today. You can change the number 20 to the value you need. And remember to use it as an expression when fill in the condition field.

    I hope this is meaningful to you.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.