Need help with an expiration flow.

Copper Contributor

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.

5 Replies

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

@Damien Rosario Thanks for reply.

 

Please review my flow ,

Santhosh_V_0-1616465243613.pngSanthosh_V_4-1616465319517.png

Santhosh_V_5-1616465373437.png

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.

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

Thanks @ Damien

If possible could you please share the screenshot of the flow to my email please (santhosevr@gmail.com), sorry i am little bit confused.

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.

 

capture20210325110738478.png

 

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.

 

capture20210325125709221.png

 

capture20210325125719216.png

 

The email will look something like this:

 
 

capture20210325131015482.png

Hope that helps!

 

Cheers and best wishes

Damien