@Lina_Ju The logic of your flow needs to be adjusted. Take a look at your Apply to Each action. You are loop through each item returned from the Filter Array action.

You are using the Filter Array action to filter out the buckets that match the names of the recipients of the email.

Each time your Apply to Each action loops through an item in the Filter Array action, it'll create a task.
---
Manual Trigger
Any time I'm building a flow that involves the When a new email arrives trigger—I like to create a manually triggered flow for testing. This speeds up the flow building process so I don't need to leave Power Automate, compose an email just to trigger the flow.
You can get the Message ID from a flow run by inserting the Message ID dynamic content into a Compose action and sending yourself an email.

Alternatively, you can get the message id from a previous flow run by clicking on Click to Download in the Outputs of your flow trigger.

Search for "id", and highlight the id between the double quote marks and copy that to your clipboard.

A compose action is optional as you can insert the Message ID directly into the Message ID field of the Get Email (V2) action. However, I prefer to use a Compose action.

Get Array of Email Addresses
The output of the recipient dynamic content from the Get Email action is a string of email addresses. Each email address is separated by a semi-colon.

To return the email addresses in an array (which you can then loop through) you will need to use an expression. Add a Compose action an insert an expression. Use the split() function. The split() function takes two parameters:
split([string of text],[separator])

Click on the dynamic content tab and insert the To dynamic content into the split() function.

Add a comma and a semi-colon between the single quotes.

Run a test. Review the outputs of the Compose action. The string of email addresses should now appear as an array.

********************ADDED INSTRUCTIONS********************
Loop through Each Email Address
You need to loop through the array of email addresses from above. Add an Apply to Each action.
Insert the output from the Compose action above that contains the recipient array. This Apply to Each action will loop through each email address (from the Compose action above). The Apply to Each action requires an array of items to loop through.

Add a Compose action. This action is optional, however I like to use Compose actions to help troubleshoot. It can also help you to better understand your flow as you are building it. You'll use this Compose action to return the firstname.lastname from the email address.
Add an expression and insert the split() function. The split() function takes two parameters:
split([string of text to split],[separator to split at])

Enter the item() function. This will return the current item you are looping through (aka the email address). Add a comma.

Between single quotes, enter the @ symbol.

Press OK and run a test. Review the outputs. The split() function will split your string of text (the email address) at the separator (the @ symbol) into an array of items.
Since you want to only return the first item in the array (firstname.lastname) in your case, you'l need to adjust the expression.

Click on the expression to edit it. Wrap the entire expression in the first() function. Don't forget to press Update.

Run another test. Review the outputs. The Compose action should now output the first part of the email address (before the @ symbol)

To learn more about the Apply to Each action—check out this YT Tutorial: 3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow
Filter Out Bucket
Add a Filter Array action. Now you can use the Filter Array action to filter out the bucket. For more info on the Filter Array action—check out this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

Create Item
The Filter Array will return an array of items — even if it's a single item. To prevent another Apply to Each action from being automatically added to your flow when you try to access the Bucket ID, you'll need an expression. Without an expression your Create Item Action will nest itself inside an Apply to Each action—which isn't want you want.

Hover over the Id label—take note of the text between the square brackets and single quotes. This is the dynamic content key for the bucket id. Important: It is case sensitive.

Remove the ID dynamic content from the bucket id field and pull the Create a task action outside of the Apply to Each action (that was automatically added). Delete the Apply to Each action that was automatically added.

In the Create a Task action, insert an expression into the Bucket Id field. Start off with:
The Filter Array action will only ever return a single item (single bucket for each recipient)—the zero in the expression above indicates you'd like to return the first item in the array. The text between the square bracket indicates you want to return the bucket id.

Place your cursor at the start of the expression by pressing the UP arrow key. Click on the dynamic content tab and insert the body dynamic content from the Filter Array action.


Fill out the rest of the fields in the action. Keep in mind, if you are adding multiple email addresses to the Assigned User Ids (as you did in your original flow) you need to separate each by a semi-colon.

Also, because you want to assign the task to each recipient, you cannot use the To dynamic content as this contains all recipients. You need to use the Current Item dynamic content (aka the email address).

If you want to assign the sender as well (which is what it looked like you were trying to do, don't forget to add a semi-colon.

Question:
Can you clarify what you want your flow to do? Do you want to create one task and assign all users to the one task? Or do you want to create a task for each recipient (all with the same details)?
----
In the meantime you might find these Planner YT Tutorials helpful:
⚡️Automate Microsoft Planner Tasks: Create Tasks from SharePoint & Excel in Minutes
Do you want to quickly create tasks in Microsoft Planner from a SharePoint list or an Excel table? In this Microsoft Power Automate tutorial I’ll show you how to build a flow that will:
⚡️ Create a task in Planner for each of your SharePoint list items
⚡️ Create a flow that will trigger each time a new SharePoint list item is created
⚡️ Create a tasks in Planner from an Excel Table
⚡️ Add a description to your tasks
IN THIS VIDEO:
✅ How to bulk create Planner tasks from a SharePoint List
✅ How to use the Get Items action with a filter query
✅ Tips on creating a fast flow while building and testing
✅ How to create a string of email addresses from a multi-person choice column
✅ How to dynamically select a bucket in the Create a Task action
✅ How to use the Filter Array action
✅ How to use the Condition action
✅ How to use the Create a Task action
✅ How to automatically create a Planner task when a new SharePoint list item is created
✅ How to bulk create Planner tasks from an Excel Table
✅ How to add a task description to a Planner Task
---
How to Email Attachments 🖇 to Your Planner Tasks
When you add attachments to a Planner task from your computer, the files are automatically saved in the Documents document library of the SharePoint site associated with the M365 Group of your plan. Instead of downloading email attachments to OneDrive or SharePoint just so you can add them to a Planner Task—automate it.
In this Microsoft Power Automate Tutorial—I’m going to show you how build a flow that will take your email attachments and add them to a Planner task. All you need to do is copy a link to a task, forward the email to yourself and the attachments will be saved onto SharePoint and attached to your planner task. Stay tuned till the end of the video where I’ll show you how to use Trigger Conditions so this automation only runs when specific conditions are met!
IN THIS VIDEO:
✅ How to get the Message ID from an Email
✅ How to use the Get an Email (V2) action with a Manual Trigger
✅ How to use the split() function to split an email subject line
✅ How to use the Scope action to group your actions
✅ How to create a folder for email attachments on SharePoint
✅ How to use the Get Attachment (V2) action
✅ How to create attachment files in SharePoint
✅ How to use the Append to Array variable action to collect attachments
✅ How to add multiple attachments to a Planner Task
✅ How to switch a manual trigger to an automated trigger
✅ How to use Trigger Conditions in a when a New Email Arrives Trigger
✅ How to trigger your flow when only specific emails arrive
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