cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tita1971
Regular Visitor

flow to remove item in SharePoint list when a task is deleted in Planner

Hi! 

I have a SharePoint list where all tasks from planner are created. I need to create a flow which deletes the item in SharePoint if that is deleted in planner. 

My SharePoint list columns of: Task name, Plan Name, Bucket name.

Tried with a https request delete but no success

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @tita1971

I'd change the design of the solution a bit and I would add the 'Planner task ID' column into the SP list. Depending on your trigger, you can fill it out when creating the list item (if trigger is from planner) or when creating the planner task (if trigger is from SP). Then you could simplify the flow and do just:

  1. Get items (SharePoint): list all items in SharePoint list
  2. Apply to each: item in SharePoint list
    1. Get a task (Planner): by Id, which will be stored in a column in the SP item
    2. Delete item (SharePoint): if Get a task has failed (3 dots, 'Configure run after', 'has failed') 

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

5 REPLIES 5
Brad_Groux
Super User II
Super User II

If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE. Want to know more? Follow @BradGroux on Twitter, and check out my Medium blog at https://msft.engineer.

tita1971
Regular Visitor

My flow looks like this: 

I need the flow to check planner and SharePoint list everyday and to compare tasks in planner vs items in SharePoint lists

If they are equal do nothing and not equal delete the item from SharePoint

I can get the items in planner vs Items in the SharePoint list by Compose action but I get stuck in how to get the item id or the title form the compose action Substract so I can use that to delete the item in SharePoint? Hope i was clear this time 😉

 

 

delete.PNGcompose.PNG

Hello @tita1971

I'd change the design of the solution a bit and I would add the 'Planner task ID' column into the SP list. Depending on your trigger, you can fill it out when creating the list item (if trigger is from planner) or when creating the planner task (if trigger is from SP). Then you could simplify the flow and do just:

  1. Get items (SharePoint): list all items in SharePoint list
  2. Apply to each: item in SharePoint list
    1. Get a task (Planner): by Id, which will be stored in a column in the SP item
    2. Delete item (SharePoint): if Get a task has failed (3 dots, 'Configure run after', 'has failed') 

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

tita1971
Regular Visitor

@tom_riha Thanks a lot😊 So much more easy then I thought. You saved me😀

I am new to this site, but I can’t get the flow to work as shown. This is exactly the flow I need, but It keeps failing. 

could you post the entire flow and show what needs to be populated in each field? For example under GET TASK, what should the task ID be?

 

if you could post the entire flow showing exactly what needs to be done it would be very helpful. Thanks 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (13,994)