Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Flow when Planner task in specific bucket is completed (Power Automate)

Posted on June 30, 2021June 30, 2021 by Tom

“Is there a way to create a Power Automate flow that would send an email only when a task in a specific Planner bucket is completed, and ignore the rest?“


The Planner trigger ‘When a task is completed’ doesn’t give you too many options. You can select the ‘Group Id’, the ‘Plan Id’, and that’s it. There’re no additional options for further filtering among the tasks, all the completed tasks will trigger the flow. Power Automate doesn’t care if the completed task was from one or another Planner bucket. But that doesn’t mean that you can’t build such functionality by yourself.

Get the bucket name

When you check the output of the ‘When a task is completed’ trigger, you’ll notice that the bucket is provided as an id. If you knew the id of the bucket, you could use the ‘bucketId’ value directly. But in this chapter we’ll turn the ‘id’ into bucket ‘name’ that’s easier to work with.

The first step to get the bucket name is to ‘List all buckets’ in the plan. As with the trigger, you can’t filter the buckets directly, you must take all of them and filter them later. Take the output from ‘List all buckets’ and filter the bucket whose ‘id’ is equal to the ‘bucketId’ with the ‘Filter array’ action.

Power Automate completed Planner task bucket

The sole output from the ‘Filter array’ action will be the corresponding bucket, whose ‘name’ you can use.

You can use it in a ‘Condition’ (email only for a specific bucket), or in a ‘Switch’ (different email for various buckets), it’s up to you. You’ve got the bucket name and you can easily use it in the flow.

Power Automate completed Planner task bucket

Note: don’t worry about the ‘Apply to each’, the output from ‘Filter array’ will be always only 1 bucket.

Use trigger condition with bucketId

The second, more advanced option is to use a trigger condition. If you want to process completed tasks only from a single bucket, you don’t have to trigger the flow for each task and search for the bucket name. You can use a trigger condition instead and trigger the flow only for tasks from that bucket. But you’ll need to know the ‘bucketId’ for that.

As already shown in the post on importing tasks in various buckets, you can get it from the ‘List buckets’ action. List all buckets, search for the desired one in that actions output, and take its id. Use it in a trigger condition that will trigger the flow only if the completed action bucketId is the same, e.g.

@equals(triggerOutputs()?['body/bucketId'], 'J7JTnbyxxxxxIPZ6IWO5gAFCK_')

Summary

You’ve got (at least) two options how to recognise the bucket of a completed Planner task with Power Automate. The first option is better if you’d like to somehow process tasks from more/all buckets. With each run it’ll check the bucket of the task and act accordingly. It doesn’t matter that it’ll trigger with each completed task as you process them anyway.

The second option is better if you’re interested only in a specific bucket. You don’t need to trigger the flow for each completed task, but only for some of them. It’s a bit more complicated as you must get the bucketId and create the trigger condition, but it’ll save a few actions in the flow, not to mention a few flow runs.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

2 thoughts on “Flow when Planner task in specific bucket is completed (Power Automate)”

  1. Erika says:
    August 19, 2022 at 1:12 pm

    Hi, maybe you can guide me with my flow. In my flow: when a form is submitted, when an approval was approved, create a planner task in 3 buckets. For all this results I have an evidence in a sharepoint list. That means one row in a sharepoint list is for one submitted form, in 3 of all sharepoint list columns I stored the planner tasks Ids from the buckets. The bucket columns are named by bucket names. Now I would like: When a task is completed, to have the completition date for each task in corresponding bucket column. How can I do that, please? I need to find the completed task Id in 3 bucket columns and overwrite it with the completition date or even I maybe should add 3 additional columns for each buckets and here I would like to have the completition date, completed by and progress status. But I can not find out how to do that

    Reply
    1. Tom says:
      August 28, 2022 at 7:14 pm

      Hello Erika,
      that’s a bit too complicated for a comment, but it’s doable using the 3 columns – use ‘Get items’ with combined Filter Query over all the 3 columns (https://tomriha.com/how-to-combine-multiple-filters-in-get-items-filter-query-power-automate/), a ‘Condition’ to check which one of them is the one that contains the ID, and update it.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes