Stage 9 of 17
3 Power Automate flows: contract review reminders (180/120/90/60/30 days) with duplicate-notification prevention, risk rating calculation, and overdue action reminders. Includes a detailed explanation of the ReminderSentFlags technique.
Important: These Are Illustrative Reminder Dates
DToDLab012-ContractReminder
Scheduled — Daily 07:00Sends review reminders at 180, 120, 90, 60, and 30 days before contract expiry. Prevents duplicate notifications using the ReminderSentFlags field.
The Duplicate Notification Problem
How ReminderSentFlags Works
The ReminderSentFlags field on the Contracts list stores a pipe-delimited string of reminder milestones that have already been sent. For example:
This means the 180-day and 120-day reminders have been sent. The 90, 60, and 30-day reminders have not yet been sent.
Before sending a reminder, the flow checks whether the milestone is already in the ReminderSentFlags string. If it is, the flow skips it. If it is not, the flow sends the reminder and appends the milestone to the string.
The check uses the contains() expression: contains(items('Apply_to_each')?['ReminderSentFlags'], '180')
Recurrence trigger
What
Trigger the flow every day at 07:00.
Why
The flow must run daily to check all contracts and send reminders on the correct day.
Expected Result
The flow runs automatically every day at 07:00.
Get items — Contracts list
What
Get all contracts from the Contracts list where Status is Active, Under Review, or Renewing.
Why
Only active contracts need reminders. Terminated, Expired, and Draft contracts should be excluded.
Expected Result
The action returns all active, under-review, and renewing contracts.
Apply to each — loop through contracts
What
Loop through each contract returned by the Get items action.
Why
Each contract needs to be checked individually against the reminder milestones.
Expected Result
The loop processes each contract in turn.
Compose — calculate DaysToExpiry
What
Calculate the number of days between today and the contract end date.
Why
The DaysToExpiry value is used to determine which reminder milestone applies.
Expected Result
The Compose action outputs the number of days to expiry as an integer.
Condition — check each milestone (180, 120, 90, 60, 30)
What
For each milestone, check two conditions: (1) DaysToExpiry is within the milestone window, and (2) the milestone has not already been sent (not in ReminderSentFlags).
Why
This is the duplicate prevention check. If the milestone is already in ReminderSentFlags, the reminder has already been sent and must not be sent again.
Expected Result
The condition evaluates to true only when the contract is within the milestone window AND the reminder has not already been sent.
If yes — Send email and update ReminderSentFlags
What
Send a reminder email to the ContractOwner and update the ReminderSentFlags field to record that this milestone has been sent.
Why
The email notifies the Contract Owner. Updating ReminderSentFlags prevents the same reminder being sent again tomorrow.
Expected Result
The Contract Owner receives one reminder email for the 180-day milestone. The ReminderSentFlags field is updated to include '180'. The flow will not send this reminder again.
Repeat for 120, 90, 60, and 30-day milestones
What
Add parallel branches (or additional conditions) for each of the remaining milestones.
Why
Each milestone is independent. A contract may be in the 90-day window without having passed through the 120-day window if it was added to the system late.
Expected Result
Each milestone sends exactly one reminder email, regardless of how many times the flow runs while the contract is within that window.
Testing the Duplicate Prevention
DToDLab012-RiskRatingCalc
Trigger: When item created or modified (Risks)Calculates the RiskRating from Likelihood × Impact and updates the Risks list.
Trigger: When an item is created or modified
What
Trigger on the Risks list whenever a record is created or modified.
Why
The RiskRating must be recalculated whenever Likelihood or Impact changes.
Expected Result
The flow triggers whenever a risk record is created or modified.
Compose — calculate RiskRating
What
Use a Switch expression to calculate the RiskRating from Likelihood and Impact.
Why
The risk matrix (Stage 5) defines the mapping. A Switch expression is cleaner than nested conditions.
Expected Result
The Compose action outputs the correct RiskRating string.
Update item — set RiskRating
What
Update the Risks list record with the calculated RiskRating.
Why
The RiskRating field in the Risks list must be updated so the Power App can display it.
Expected Result
The RiskRating field is updated in the Risks list. The Power App displays the correct rating.
DToDLab012-OverdueActions
Scheduled — Daily 08:00Sends daily reminders for overdue actions to the action owner.
Recurrence trigger
What
Trigger the flow every day at 08:00.
Why
Overdue actions should be flagged daily until they are completed.
Expected Result
The flow runs every day at 08:00.
Get items — Actions list
What
Get all actions where DueDate is before today and Status is not Complete.
Why
Only overdue, incomplete actions need reminders.
Expected Result
The action returns all overdue, incomplete actions.
Apply to each — send reminder email
What
For each overdue action, send a reminder email to the action owner.
Why
Each action owner must be notified individually.
Expected Result
Each action owner receives a daily reminder email for each overdue action.
Daily Reminders for Overdue Actions
Need more help with the concepts?
Visit DosToDigital for guides, templates, and deeper explanations.