Hi @Teresa24486
I did some work to hopefully get you started here and made some design decisions in the process to make it easier to manage and hopefully get what you are looking to do...
Tables / Setup
- Created a table called "Schedule" that has a date only field for schedule date and the Name field was set to AutoNumber. This table's primary job is to determine when you would want to run the process. So you would need to set this up with the dates you want to execute and send the reports. Of course you could get more complex with this and add the Department as a lookup field or other types of functionality but I kept it simple.
- Created a table called "Department" that would hold each of your departments. This is better than a plain Choice field and trying to use String Map table in my opinion. Of course this is another option but I like using tables as they provide more flexibility.
Power Automate Flows
Activate Schedule if Current Date
The purpose of this flow is to run daily (1 time) and look at your schedule table to determine if it should activate the schedule record. All future dates would be setup as "Inactive" and this process would look at the schedule run date field and if it is the same as current date then activate the record (note this will be trigger for next flow 😀).
Some screen shots of this flow are below. Of course there are ways to optimize this as well and set additional criteria on the selection but I kept simple.


After this flow completes it will have updated the Schedule table record for the current date and that would kick off the second flow.
Widgets next 30 days by Department
The goal for this flow is that it would be kicked off by the schedule record update to the statecode and it would run for each department and look for records in your table (my Widgets table as example) where the department matches and the Expiry date is within the next 30 days) and send out notifications. Of course you might also filter based on a status of that record etc. as well but I kept simple in my example.
After this you would still need to create your Excel file and insert the data and then send the file by email to I am assuming an email field tied to the department table (another good reason to have as a table).


This might get you started on the Excel file part: https://benediktbergmann.eu/2020/09/27/create-and-fill-an-excel-file-dynamically-with-power-automate/
Hope this helps you down your path @Teresa24486 .
There are many ways to do this but I think this would work well.
Hopefully this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew