Hi @hi5
sorry for late response !
I have designed the flow which updates the task details based on update in sharepoint list item.
However few things to be considered
1. I have shown the flow design just to show how to add/update attachments or bucket details as these are issues which u are having now.
Coming to flow design - we need one more list which stores the details of task, it helps to find the task id corresponding to list item id- something like below

Here Title represent the list item ID and other represent task ID.
Let's proceed to flow design
1. Trigger the flow when list item is created or modified

2. Initialize an attachments variable of type array (will be using it later)

3. Use list buckets action to list all buckets in specifc plan

4. Use filter array to filter the bucket details present in the list item


Now use a condition to check whether the item is created/modified

If Created date of list item = modified date of list item, it means item is created thus following Yes branch and else it will be modified, which will be No branch
So if the item is created- it will follow Yes branch- for that see the steps
a. It will create the task using Create task (preview) action ( see here it updates only required details, you can add the additional details if needed)


To add attachments from list item in planner- follow the steps (b-d)
b. Use get attachments to list all attachments associated with the created list item like below

C. Use select action to convert the get attachments information to a format so to add attachments within planner

d. use update task details to add these attachments details in form of references in planner


Note that you have to toggle this option in references field to look like above-

e. Once task details are added, use the create item to create item in other list where task details are stored which will be used for when item is modified.


No branch - when item is modified.
a. Use get items to get details of task which we are going to update by looking up the list using the list item's ID

b. Use get item to get details of list item details modfiied

c. Here next, use update task to update task details (basically i am updating all fields in task even it is not updated, so just to ensure that everything is updated, else complex logic has to be used)

Expression to find the task id -
first(outputs('Get_items')?['body/value'])?['TaskID']
(Next steps d-g will be used for adding any attachments added in list item as part of modification)
d. use get attachments action to get list of attachments associated with list item
e. Get details of task so to get its attachments details as well.
Expression -
first(outputs('Get_items')?['body/value'])?['TaskID']
f. Next we will loop through list of attachments present in sharepoint list item to check whether any new attachment needs to be added in planner
f.1 - Use filter array to check whether the planner attachments contains the given attachment present in list item
f2- If there is no such attachments in planner- , then add its details (display name and resource link ) to attachments array like below
g. Use update task details to update the task like below
Expression -
first(outputs('Get_items')?['body/value'])?['TaskID']
So this is how flow should be designed , in addition you can create another flow which can does the deletion of task items from planner when item in SP is deleted.
Also few limitations i have found out which can't be done normally but via graph api
a. when attachment in list item is deleted, we can remove that references details directly using the planner action. we have to go by graph api to do that.