cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
milo1234
Helper I
Helper I

Send an email when a Planner Task is completed within a particular bucket

I want to send an email when a planner task is completed within my last bucket named 'completed'.

Please could someone help? 

image.png

 

3 REPLIES 3
ChrisMendoza
Resolver II
Resolver II

You need to get the 'bucketId' of completed and then you can create a Trigger Condition like what is described in https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Power-Automate-Trigger-Conditions-... . One way you can GET 'bucketId'(s) is by using 'List Buckets'. 'bucketId' is also in the trigger action 'body'. By defining this Trigger Condition, the flow will only run when the expression evaluates to TRUE.

 

@equals(triggerOutputs()?['body/bucketId'],'bucketIdvalue-goesHere')

 

Thank you @ChrisMendoza,

Could you please show this in a flow example as I am new to Power Automate? 

I really wish I could find the video where I learned how to access items in JSON 🤔. The code snippet I provided is using the below method to GET the 'buckedId'.

  • Task is completed in the bucket that I need the 'bucketId' for; your completed bucket
  • The outputs of the trigger is triggerOutputs()
    • headers
    • body
      • a whole bunch of details regarding the task are found here, specifically the 'bucketId' for your request

Outputs > body > bucketId is the navigation of the JSON

 

The above code snippet with values from this example flow run:

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

equals checks whether both values, expressions, or objects are equivalent. So, the expression asks, "Is the bucketId value of the completed task equal to this string value?". True or False. Within a trigger condition, a true statement actually runs the flow. In a false statement, the flow does not run.

 

image.pngimage.png

 

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (50,673)