It sounds like you are using the "When a Task is is created" trigger. I believe that you should be using the "When a task is completed" trigger.
If you need more help, please post a screen shot of your Flow.
Remove the When a task is completed action and the actions below it from your Flow. Create a second Flow and use the When a task is completed Trigger. Send the emails from the new Flow.
You don't want more than 1 trigger in a Flow except in unusual circumstances.
I think the problem is because task is completed action dont´have a idtask, only idplan and idgroup. the idea is to trigger the e-mail only when the correct task is complete.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.