@alvinlee You need to make a small adjustment to your flow. The assignments dynamic content from the List Tasks action returns an array of assignments. While you are using an Apply to Each action to loop through each assignment returned, the output of an assignment is an object. The Get User Profile (V2) action requires a user's id or email address. You can confirm this by outputting the Current Item dynamic content in a Compose action. I cover this and other techniques in a YT Tutorial that you might be interested in (linked at the bottom).
Filter Array
Although it may look like the Filter Array action can only take a single condition—it can take multiple conditions when using the Advanced Editing Mode.
Refer to this section of this YT tutorial for how to add multiple conditions to a Filter Array action.
Return Count of Tasks
Whenever I use a Filter Array action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow. Insert a Compose action. Add an Expression. Use the length() function.

Select the Dynamic content tab and insert the body dynamic content from the Filter Array action into the length() function.

Run a test. Review the outputs and confirm the number that outputs is what you are expecting.

Condition Check
Add a Condition action to your flow. If items have returned (aka there is number stored in the Compose action—that is not equal to 0), add the rest of your actions to the Yes branch. If not, do nothing.

Collect the User Ids
I'm using a Compose action to output the value assignments dynamic content. This is optional and can help you troubleshoot your flow.

Run a test. Review the outputs. We'll need the dynamic content key to collect the User Id's. The dynamic content key is the text in red between the double quotes.

Add a Select action. Insert the output from the Compose action above (if you've used one). If you haven't, you can insert the value Assignments dynamic content into the From field.
Click on the icon to switch the input mode.

In the Map field, insert an expression. Use the item() function. Replace the text in blue below with the appropriate dynamic content key. In your case, it's userId.
item()?['dynamic content key']

Run a test. Review the outputs. You can see in the Input of the Select action the array of assignments. The output contains the User Id's only.

Get Each User Profile
Add an Apply to Each action to loop through each User Id. Insert the output from the Select action.

Add a Get user Profile (V2) action. Insert the Current Item dynamic content from the appropriate Apply to Each action. Tip: Always rename your actions especially when inserting multiple instances of the same action in your flow.

Run a test. Review the outputs.

Now you can insert the Send an Email (V2) action into the second Apply to Each action.

Hope this helps!
You might be interested in these YT Tutorials:
Are you using the Microsoft Power Automate Filter Array Action wrong?
In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
1️⃣ Cross-Referencing Data
2️⃣ Filtering by Key
3️⃣ Substring Matching
Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.
IN THIS VIDEO:
✅ 3 Ways to Use the Filter Array Action
✅ How to use the Scope Action to Group Actions
✅ How to Check the Number of Items returned from a Filter Array Action
✅ How to Cross-Reference Data in Excel with a SharePoint List
✅ How the Filter Array Action Works
✅ How to Access the Dynamic Content from a Filter Array Action
✅ How to Filter Items by a Key
✅ How to Filter Items by Matching a Substring
✅ How to Use Multiple Conditions in a Filter Array Action
----
5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows
In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!
IN THIS VIDEO:
✅ How to troubleshoot a false Condition action result
✅ How to get dynamic content when it isn’t selectable from the list of dynamic content
✅ How to troubleshoot an Apply to Each action that isn’t looping through
✅ How to troubleshoot a skipped Apply to Each action
✅ How to troubleshoot a Filter Query
✅ How to use a SharePoint yes/no column in a Filter Query
✅ How to use Compose actions to troubleshoot a Power Automate flow
✅ How to troubleshoot multiple emails being sent
✅ How to troubleshoot multiple Teams messages being sent
Hope this helps!
If I helped you solve your problem—please mark my post as a solution
✅.
Consider giving me a
👍 if you liked my response!
👉 Level up your Power Automate skills by checking out my tutorials on
YouTube👉 Tips and Tricks on
TikTok and
Instagram