So, after creating a couple of solutions for you, I have changed my opinion. While it is technically possible to go in the direction that I suggested, it is not a good idea. The primary reason is that since you don't have the ability to filter or sort the data returned when you use "Get tasks", you may run into a Flow limitation for this action - there is a limit on the number of rows that will be returned. As a result, the data you want may not be returned.
Another way of approaching this issue would be to start a Flow when the task is created and wait for the due date (or loop periodically to see if the due date is near or if the task has been completed). This is a very bad idea because your Flow will only run for a maximum of 30 days - after that it will be cancelled. This is an issue if you tasks run more than 30 days.
So, what you want to do is possible but the available solutions all have serious faults.
Sorry.....