cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mcarleton
New Member

Update an existing Planner Task with an email

Working with outlook and tasks. Here is what I want to do: 

 

  • A new email populates in an inbox
    • Does this subject line or conversation id (or some other value) exist in a task? 
      • No: Create new task
      • Yes: Update existing task (this is the part I need help with)

@eric-cheng @ScottShearer 

5 REPLIES 5
eric-cheng
Solution Sage
Solution Sage

Hi @mcarleton ,

 

Try the below flow.

 

1) Use a when a new email arrives trigger and initialize a boolean variable defaulted to @false

 

ericcheng_0-1627946270008.png

 

2) Use the List tasks action in Planner

 

ericcheng_1-1627946313377.png

 

3) Add a condition to match the Title to contain the subject of the email.  You can modify this condition to suit your needs e.g. description contains subject etc.

 

ericcheng_2-1627946356838.png

 

 

4) If true, it means a task was found.   Set the boolean to @true and use either the Update a task action or Update task details action depending what you want to update.  Pass in the ID of the looped task.

 

ericcheng_4-1627946435543.png

 

5) Exit the loop and add a condition to check whether IsFound is false meaning no tasks were found.  If so, use a Create a task action to create a planner task

ericcheng_5-1627946530718.png

 

** note - there is a chance you may end up updating multiple planner tasks if you don't set your conditions tight enough.  For example, if two tasks contains the same keyword, it will update both of them so you will need a better identifier.  E.g. Task Id below

ericcheng_6-1627946665505.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

 

mcarleton
New Member

@eric-cheng - i'm not sure what I'm doing wrong. It doesn't add to an existing task. The same email populates multiple tasks. 

 

Hi @mcarleton ,

 

Please post a screenshot of your flow.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

flow1.jpgflow2.jpgflow3.jpgflow4.jpg1 new email came in but it repeated it in the other bucket as well1 new email came in but it repeated it in the other bucket as well

@eric-cheng 

Hi @mcarleton ,

 

Firstly can you check that your Condition 2 is outside of your Apply to Each loop as it sounds like it is inside.

 

I have also highlighted your two conditions.  Can you run your flow with 1 email that should trigger an update i.e. title should contain subject and confirm if the1st condition is returning true and 2nd condition is returning false?

 

If it isnt, add 2 Compose actions before the conditions and add  both your subject field and title field. Run it again and post the values so we can confirm it.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,065)