Mar 22 2021 01:19 PM - edited Mar 22 2021 01:20 PM
Hi All,
I need to built a expiration reminder flow when an item in a list is modified or created. The flow takes expiration date from the one of the column of the list and sending emails three days prior to the expiration date , one day prior to expiration date and also when expired.
I have tried a couple of days but ended up with no luck. Please advice.
Mar 22 2021 06:09 PM
Hi @Santhosh_V
Can you show your flow so we can diagnose?
I have built a flow that does exactly that for 14, 7 and next day reminders based on a SharePoint column value, so I can help you to find the issue but need to see what you have come up with.
Cheers
Damien
Mar 22 2021 07:18 PM
@Damien_Rosario Thanks for reply.
Please review my flow ,
All the do until having the same values only condition will differ.
There 3 do until in parallel for each remainder.
Dountil1 : today'date prior to 1 day
Dountil2 : today'date prior to 3 day
Dountil1 : today'date equals to exp date
variable Today's date :formatdatetime(addDays(utcNow(),0), 'yyyy-MM-dd')
Variable 2(One Day prior): formatdatetime(addDays(outputs('Get_item')?['body/EXPDate0'],-1),'yyyy-MM-dd')
Variable 3(three day prior): formatdatetime(addDays(outputs('Get_item')?['body/EXPDate0'],-3),'yyyy-MM-dd')
If the conditions satisfies send an reminder email. Also please suggest its possible to run a flow for more than a month (Aware timeout is max P1M)Just for an doubt. Looking for advise.
Mar 22 2021 08:49 PM
Hi @Santhosh_V
You do it a different way to the way I do it.
Here's a different way to approach your reminder workflow.
If, when the new SharePoint item is created or modified, a date is captured in a SharePoint field, you can have that as it's own flow and then a separate flow as the reminder flow.
E.g. Flow 1 - Capturing the expiration date
1. (Trigger) When an item has been created or modified
2. Convert time zone (this helps to ensure that the base time, source time zone, destination time zone and format of the date/time matches your settings so it captures the right date/time + whatever days you want the reminder to be).
3. Update item (ensure that the Expiration date column has the date value input into it from the Convert time zone + whatever days you want the reminder to be)
E.g. Flow 2 - Reminder workflow
1. (Trigger) Automatic loop (you can set the interval and frequency of the loop to run)
2. Convert time zone (this helps to ensure that the base time, source time zone, destination time zone and format of the date/time matches your settings and triggers accurately).
3. Add your actions for the Condition and email as needed.
As far as I know, Automatic loop doesn't expire as I've had mine running since March 2019.
Hope something in there helps.
Cheers
Damien
Mar 23 2021 08:30 AM
Mar 24 2021 07:11 PM
Hi @Santhosh_V
I've mocked up what I was suggesting in my last post which you'll find below. I'll post it here so anyone else looking for ideas can also reference this in case it solves their needs.
Just follow and recreate what I have put inside the flow and ensure that you adjust any details to suit your set up.
Flow 1 - Capturing the expiration date
This flow will note when an item is created or modified and it will covert the date to ensure it's accurate, and will then save the current date to a SharePoint column so that it can be used in the daily recurrence flow.
Flow 2 - Reminder workflow
This flow will trigger daily at 12:00PM, look for any SharePoint items that have a date of 3 days from expiration, and send an email for each item that is due to expire in 3 days.
Note: I could have also used the Created date or Modified date to help trigger the flow, but for the above example, I manually added a date to a SharePoint column. You can vary this approach as needed.
The email will look something like this:
Hope that helps!
Cheers and best wishes
Damien