With the current SharePoint in Office 365 (as of 2017), what is the best approach to generate automatic notification emails and/or tasks based on a document's date metadata? For example, say we want to be alerted a few months before a contract stored in a document library is due to expire. Is the correct/best way to use retention policies and workflows, or is best practice now to use Flow, now that SharePoint Designer isn't being updated. Please provide a step-by-step explanation.
The summary of your requirement is receiving a notification couple of month before the contract expires.
Any approach you choose behind the scene it works same in your case.
- There is a daily running job monitor all documents and find documents matches your condition.
- If systems find any document sends a notification.
Let me define the solutions
This is an out of box solution available from 2007. It solves most of the retention policies. The implementation is very easy there will be no additional maintenance efforts.
The implementation as follows
- Go to your Library Settings -> Information management policy settings.
- Enable Retention
- Add a stage. In stage add enter number in years/months/days to meet your condition
- Select your action Start a workflow. (Note: In your case, you need to create a workflow on this library to send a notification and it should be "Start workflow manually").
- Save changes. It works as expected.
Refer complete example here.
The Microsoft Flows are mainly designed to interact with the multiple applications without worrying about coding and extra maintenance. If you take your scenario you have trigger a flow every day to check the condition and send a notification. It cost a lot. The Flows requires an additional license if you trigger more than 2000 per year.
SharePoint Designer Workflow
You can achieve your scenario using site workflow which can be scheduled to run daily and send a notification when matches your condition. This process is achievable using out of the box retention policy and implementing again is a cost of development.
The summary is Retention Policy is best works for you.
There are at least two options to achieve this.
Use Information Management Policy, define retention stages. Under List Setting ==> Information Management Policy Setting ==> Enable Retention and Add Retention Stage. You can start a workflow based on the retention. If you want to define a custom date column, you will need to add a site column.
Create Calculated Column with formula e.g.
=[Contract Expiry Date] - 120, and create a workflow to send an email based on the status/calculated column.