How to Notify Bulk License Expirations in Prior Weeks using Power Automate

Microsoft Power automate

Introduction

Efficiency in managing licenses is paramount for any organization, yet staying ahead of expirations can be a daunting task.

In the dynamic landscape of modern enterprises, managing software licenses efficiently is not merely a challenge but a critical necessity.

Picture this scenario: your organization operates on a multitude of licenses across various tools and platforms. Tracking their expiration dates manually is not only time-consuming but also prone to errors, potentially leading to disruptions in operations.

In this article, I'll delve into the art of preemptive notification for bulk license expirations, empowering you to navigate weeks in advance with finesse.

Notes

  • Both the Microsoft form and the Power Automate flow should be created with the same Microsoft account.
  • Rename all actions to identify the flow easily. Here, I have renamed and described the actions to give a better understanding.

Step 1. Create a SharePoint List that contains all the purchased License details. (License Name/ Title, SLA start date, SLA end date, Vendor, SLA value, Contact Details, etc.) or Export an existing Excel sheet to Microsoft Lists.

Step 2. Log in to the Power Automate Portal. Click Create and choose Scheduled Cloud Flow.

Make flow

Step 3. Choose Frequency as “Day” to run the flow every day and choose Interval as 1.

In Advanced Options you can select your Time Zone and the Time which the email is sending.

Step 4. Choose an operation as ‘Get Items’ from SharePoint. Enter the Site address and choose List Name.

In this step, we are connecting our created SharePoint List.

Get items

Step 5. Choose an operation as ‘Compose’ and select from Dynamic Content “SLA End date” (Which is the License Expiry date)

This will automatically create an’ Apply to each.’

Apply to each

Step 6. In the Apply to each, under Compose, Choose an operation as ‘Condition’

In this step, we check whether today’s date is equal to 3 weeks 2 weeks, or 1 week before the SLA End Date.

Below are the commands to get the dates prior to the SLA End date.

1 week

formatDateTime(addToTime(items('Apply_to_each')?['field_5'],-1,'Week'),'MM-dd-yyyy')

2 weeks

formatDateTime(addToTime(items('Apply_to_each')?['field_5'],-2,'Week'),'MM-dd-yyyy')

3 weeks

formatDateTime(addToTime(items('Apply_to_each')?['field_5'],-3,'Week'),'MM-dd-yyyy')

('Apply_to_each')?['field_5'] expression represents the ‘SLA End date’ in ‘Apply to each’ section. To check that, move your cursor to ‘SLA End date’ in ‘Apply to each’ section.

Here’s the command to get the current Date.

formatDateTime(utcNow(),'MM-dd-yyyy')

Note. SLA End Date format in SharePoint List should be equal to the Date format in the flow (In Expressions). I have used the format of 'MM-dd-yyyy'.

Condition

If the current date is equal to one of the selected days ( 3 weeks, 2 weeks, or 1 week prior to the SLA End date), automatically send an email to relevant parties notifying them that the appropriate License is about to Expire.

Step 7. If Yes, Choose an Operation as ‘Send an Email’

You can customize the email as you wish.

Here’s my customized template. (Add from Dynamic content to specify the email)

Note. If No, keep it blank.

Send an email


Similar Articles