Need help with an expiration flow.

%3CLINGO-SUB%20id%3D%22lingo-sub-2228335%22%20slang%3D%22en-US%22%3ENeed%20help%20with%20an%20expiration%20flow.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2228335%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20built%20a%20expiration%20reminder%20flow%20when%20an%20item%20in%20a%20list%20is%20modified%20or%20created.%20The%20flow%20takes%20expiration%20date%20from%20the%20one%20of%20the%20column%20of%20the%20list%20and%20sending%20emails%20three%20days%20prior%20to%20the%20expiration%20date%20%2C%20one%20day%20prior%20to%20expiration%20date%20and%20also%20when%20expired.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20couple%20of%20days%20but%20ended%20up%20with%20no%20luck.%20Please%20advice.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2228335%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2228765%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20an%20expiration%20flow.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2228765%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1005252%22%20target%3D%22_blank%22%3E%40Santhosh_V%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20show%20your%20flow%20so%20we%20can%20diagnose%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20built%20a%20flow%20that%20does%20exactly%20that%20for%2014%2C%207%20and%20next%20day%20reminders%20based%20on%20a%20SharePoint%20column%20value%2C%20so%20I%20can%20help%20you%20to%20find%20the%20issue%20but%20need%20to%20see%20what%20you%20have%20come%20up%20with.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EDamien%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2228850%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20an%20expiration%20flow.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2228850%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F89704%22%20target%3D%22_blank%22%3E%40Damien%20Rosario%3C%2FA%3E%26nbsp%3BThanks%20for%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20review%20my%20flow%20%2C%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Santhosh_V_0-1616465243613.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266212iAA8BEFB9EE171A67%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Santhosh_V_0-1616465243613.png%22%20alt%3D%22Santhosh_V_0-1616465243613.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Santhosh_V_4-1616465319517.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266217i5BA9D88B7BAD5A91%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Santhosh_V_4-1616465319517.png%22%20alt%3D%22Santhosh_V_4-1616465319517.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Santhosh_V_5-1616465373437.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F266218i89BDC8831DE7F592%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Santhosh_V_5-1616465373437.png%22%20alt%3D%22Santhosh_V_5-1616465373437.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAll%20the%20do%20until%20having%20the%20same%20values%20only%20condition%20will%20differ.%3C%2FP%3E%3CP%3EThere%203%20do%20until%20in%20parallel%20for%20each%20remainder.%3C%2FP%3E%3CP%3EDountil1%20%3A%20today'date%20prior%20to%201%20day%3C%2FP%3E%3CP%3EDountil2%20%3A%20today'date%20prior%20to%203%20day%3C%2FP%3E%3CP%3EDountil1%20%3A%20today'date%20equals%20to%20exp%20date%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Evariable%20Today's%20date%20%3A%3CSPAN%3Eformatdatetime(addDays(utcNow()%2C0)%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E'yyyy-MM-dd'%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EVariable%202(One%20Day%20prior)%3A%26nbsp%3B%3CSPAN%3Eformatdatetime(addDays(outputs(%3C%2FSPAN%3E%3CSPAN%3E'Get_item'%3C%2FSPAN%3E%3CSPAN%3E)%3F%5B%3C%2FSPAN%3E%3CSPAN%3E'body%2FEXPDate0'%3C%2FSPAN%3E%3CSPAN%3E%5D%2C-1)%2C%3C%2FSPAN%3E%3CSPAN%3E'yyyy-MM-dd'%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EVariable%203(three%20day%20prior)%3A%26nbsp%3Bformatdatetime(addDays(outputs('Get_item')%3F%5B'body%2FEXPDate0'%5D%2C-3)%2C'yyyy-MM-dd')%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20the%20conditions%20satisfies%20send%20an%20reminder%20email.%20Also%20please%20suggest%20its%20possible%20to%20run%20a%20flow%20for%20more%20than%20a%20month%20(Aware%20timeout%20is%20max%20P1M)Just%20for%20an%20doubt.%20Looking%20for%20advise.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2229002%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20an%20expiration%20flow.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2229002%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1005252%22%20target%3D%22_blank%22%3E%40Santhosh_V%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20do%20it%20a%20different%20way%20to%20the%20way%20I%20do%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20a%20different%20way%20to%20approach%20your%20reminder%20workflow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%2C%20when%20the%20new%20SharePoint%20item%20is%20created%20or%20modified%2C%20a%20date%20is%20captured%20in%20a%20SharePoint%20field%2C%20you%20can%20have%20that%20as%20it's%20own%20flow%20and%20then%20a%20separate%20flow%20as%20the%20reminder%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EE.g.%26nbsp%3B%3CSTRONG%3EFlow%201%20-%20Capturing%20the%20expiration%20date%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E1.%20%3CSTRONG%3E(Trigger)%3C%2FSTRONG%3E%20When%20an%20item%20has%20been%20created%20or%20modified%3C%2FP%3E%3CP%3E2.%20%3CSTRONG%3EConvert%20time%20zone%3C%2FSTRONG%3E%20(this%20helps%20to%20ensure%20that%20the%20base%20time%2C%20source%20time%20zone%2C%20destination%20time%20zone%20and%20format%20of%20the%20date%2Ftime%20matches%20your%20settings%20so%20it%20captures%20the%20right%20date%2Ftime%20%2B%20whatever%20days%20you%20want%20the%20reminder%20to%20be).%3C%2FP%3E%3CP%3E3.%20%3CSTRONG%3EUpdate%20item%3C%2FSTRONG%3E%20(ensure%20that%20the%20Expiration%20date%20column%20has%20the%20date%20value%20input%20into%20it%20from%20the%20Convert%20time%20zone%20%2B%20whatever%20days%20you%20want%20the%20reminder%20to%20be)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EE.g.%20%3CSTRONG%3EFlow%202%20-%20Reminder%20workflow%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E1.%20%3CSTRONG%3E(Trigger)%3C%2FSTRONG%3E%20Automatic%20loop%20(you%20can%20set%20the%20interval%20and%20frequency%20of%20the%20loop%20to%20run)%3C%2FP%3E%3CP%3E2.%26nbsp%3B%3CSTRONG%3EConvert%20time%20zone%3C%2FSTRONG%3E%20(this%20helps%20to%20ensure%20that%20the%20base%20time%2C%20source%20time%20zone%2C%20destination%20time%20zone%20and%20format%20of%20the%20date%2Ftime%20matches%20your%20settings%20and%20triggers%20accurately).%3C%2FP%3E%3CP%3E3.%20Add%20your%20actions%20for%20the%20Condition%20and%20email%20as%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BAs%20far%20as%20I%20know%2C%20Automatic%20loop%20doesn't%20expire%20as%20I've%20had%20mine%20running%20since%20March%202019.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20something%20in%20there%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3CP%3EDamien%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2230035%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20an%20expiration%20flow.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2230035%22%20slang%3D%22en-US%22%3EThanks%20%40%20Damien%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20possible%20could%20you%20please%20share%20the%20screenshot%20of%20the%20flow%20to%20my%20email%20please%20(santhosevr%40gmail.com)%2C%20sorry%20i%20am%20little%20bit%20confused.%3C%2FLINGO-BODY%3E
Occasional 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