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

Using Flow to copy a template bucket

I have daily tasks that I need my employees to complete and I would like to automate this task by having flow copy all of the tasks that I have created in my planner template bucket over to the employees bucket. Currently I am having to do the copy manually which is a royal PITA since I have over 250 tasks that need to be copied.

 

I am attempting to automatae this task by using the following two How To sites:

https://medium.com/@rob.quatela/creating-recurring-tasks-in-microsoft-planner-using-microsoft-flow-f...

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Copy-Planner-task-from-one-plan-to...

 

The issue I am having is that the site I used to create the copy is triggered when someone creates a new task. In my senario I need the trigger to be on a timer and not when a task is created. In the How To they are getting a value from the [When a new task is created] command. I need to get this value or set it manually somehow when my scheduled task runs.

 

Thanks,

-Eric Putnam

1 ACCEPTED SOLUTION

Accepted Solutions
edgonzales
Most Valuable Professional
Most Valuable Professional

Oooh, plot twist.

Ok, so in order to do that, you need the action "Get Task Details" and since we only want to look at the ones in your template bucket, we'll add that inside the "If Yes" part of the condition.  For the Task ID on this step, choose the Task ID from the "List all tasks" step so Flow will (hopefully) grab the details of the current task in the condition.

20190614d.PNG20190614e.PNG

 

Then after the new task is created in the new bucket, you'll want to update the NEW Task Details with the content in the "Get Task Details" step:

20190614f.PNG20190614g.PNG

Note which step the dynamic data is coming from, and also how I am using the search box to narrow the list.

 

Keep on truckin' Robot wink

View solution in original post

14 REPLIES 14
edgonzales
Most Valuable Professional
Most Valuable Professional

@Eputnam - Eric,

Hi there.  Are you just looking to copy the tasks from one bucket to another? (not assigning them, right?)

 

It seems like the second write-up you have should do the trick, but replace his trigger with a Recurrence and Get Tasks right after that, then everything else should be the same.

 

Not sure if that puts you on the right track or not, let us know.

 

-Ed-

edgonzales

 

Hi Ed, thanks for the quick reply.This is my first attempt in doing any kind of work in Flow so I will need some hand holding while going this issue.

 

When I selected the Planner option 'Get a Task' it is asking for a Task Id which I do not know. This is something that I enter in a random value for such as 'Daily Task'? 

My second question is that in the write-up that I am following I see in the 'Campare Bucket IDs' setup that the writter uses in their equal to statement a value called 'value Bucket ID'. I do not have this option when I am attempted to select the equal to value.

edgonzales
Most Valuable Professional
Most Valuable Professional

Ah, ok...the context helps.  Apologies if I cover anything you already know, but I figure it's best not to miss anything.  I haven't done this yet, so we're just discussing theory anyway Smiley Happy

 

So, the Planner hierarchy is Plan > Bucket > Task(s) right (and each task can be assigned to multiple people or none at all)?  And my understanding of what you want to do is create a bunch of tasks in one bucket (almost like a template) and then copy those into other buckets within the same plan.  Good so far?

 

The second writeup you link to does this, but is triggered by "creating a new task" as you mention in your original post.  Your challenge is you want to bulk copy the tasks all at once to the other bucket, so you'll either need a manual trigger (button) or a recurrence (schedule).  When the trigger was originally when a new task is created, you had all of the task info from the trigger.  Now that we're shifting the trigger to something else, we still need to get the task details.

 

To do this, our next step after the trigger (button or schedule) would be to List Tasks (not "Get Task" as that is for a distinct/singular task, and we want a bunch), and then from there we can "copy" them into the new bucket by using "Create Task" and just assigning the new bucket ID.  20190614a.PNG

If the FROM bucket and the TO buckets are always the same, then you can skip the steps where he gets the names and stuff (this actually makes things wayyyy easier) and just used a static ID for each.  Here's where things get a little weird:

Because you're listing ALL of the tasks in a plan, you want to filter out only the ones in a certain bucket (your template), right?  So you'll want to set a "Condition" to look for the bucket ID of your template bucket, but to get that ID, create a task in your template bucket that you'll recognize and run your flow just as it is above.  Then go back to the output data and find the line that has that task name...It will look like "title": "Create Demo Surveys" - Right above that is "bucketId": "ywYgy7M-80qgCoGbVXmSAmQAD9kB" and that bit of gibberish is your Template Bucket ID.

 

So now, you can add a condition to look for that bucket ID...but because there are multiple tasks, Flow will automatically put this in an "Apply to Each" loop.  Don't freak out, this is totally a good thing.  It's going down your list of tasks and asking "Is this in the bucket I want?" and then acting from there.

20190614b.PNG

When you use "Condition" it branches into a "Yes" or a "No", so the "Yes" path would be "Create a new task" and the "No" path could just be a terminate.20190614c.PNG

Note that I chose a totally different Plan, and then the Bucket ID is a clever drop-down with the friendly display name (no need for the TO bucket gibberish ID).

 

Now, if you decide you want to add the Assigned User Ids, you totally can...but remember that because each task can have multiple assigned to users, it will create another Apply to Each loop within the first one.  And that may get weird.

 

But try that out so far, and see if that gets you closer.  I don't want to go too far down the wrong direction, so let us know how things pan out.

-Ed-

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

@edgonzales 

 

Ed, thanks for your time for this is exactly what I was needing. 

I have however ran into an issue which it appears that only the title of the task is being copied over and not the 'checklist' items within the task.

How can I get the details within my task to copy over to the new bucket?

edgonzales
Most Valuable Professional
Most Valuable Professional

Oooh, plot twist.

Ok, so in order to do that, you need the action "Get Task Details" and since we only want to look at the ones in your template bucket, we'll add that inside the "If Yes" part of the condition.  For the Task ID on this step, choose the Task ID from the "List all tasks" step so Flow will (hopefully) grab the details of the current task in the condition.

20190614d.PNG20190614e.PNG

 

Then after the new task is created in the new bucket, you'll want to update the NEW Task Details with the content in the "Get Task Details" step:

20190614f.PNG20190614g.PNG

Note which step the dynamic data is coming from, and also how I am using the search box to narrow the list.

 

Keep on truckin' Robot wink

We are so close....Smiley Happy

 

The description of the task now comes over but the 'Checklist' and 'Comments' sections are still empty.

 

Capture.PNG

 

I looked for a checklist variable  where we had retreived the Description but I did not see anything that would get the checklist items. I also did not see a comment variable either.

 

edgonzales
Most Valuable Professional
Most Valuable Professional

think we'd be able to do Checklists with some kind of code sorcery since you have that option on the Planner front-end if you did each task individually.

 

Screen capture: Showing the COPY TASK dialog box. Assignments, Progress, and Dates items are off by default.

 

But I can't find anything on Comments so I don't know if that's something you can grab from anywhere.  If you move them manually, do the comments come along too?

 

Going a totally different direction, there's a PowerShell script that will do most of this, too.  Link Here (blog article in the details), and if you wanted, you could call the script with a Flow...but now we're in the weeds and I don't know how comfortable you are with that.

When I do a manual copy the checklist does come over but the comments section does not. I am fine with the comment section not coming over but I really need the checklist section. This has all of the indivdual items that I need people to complete.

I am familiar with PowerShell so tackling the script would not be an issue. The only problem is that I do not have the permissions to accesa  Microsoft Graph. I saw that solution in an earlier search and when I attempted to connect to Graph I was unable to create a new application under teh Azure-Actvie directory tab.

edgonzales
Most Valuable Professional
Most Valuable Professional

@Eputnam - I think we'll get as far as pulling the checklist off of the template task, but I can't figure a way without PowerShell to bring those into the new task.  Hopefully, someone out there has a fix. 🙂

 

 

@edgonzales 

 

Ed,

I believe that I was able to setup the connection needed for PowerShell commands. Do you have any command that I can use to test the connection with? 

 

I used the following guide: https://www.thelazyadministrator.com/2018/03/20/connect-to-the-microsoft-graph-api-with-powershell/ to setup the connection but the test that they use in the guide, list AD users, returns an error code 403 forbidden.

edgonzales
Most Valuable Professional
Most Valuable Professional

I don't have any at hand, but check John Liu's blog on it here.  There was also this thread, which may have some useful links.

 

Keep us posted!

-Ed-

 

 

 

If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Anonymous
Not applicable

Hello @edgonzales  - I have been scouring the internet for a couple of hours hoping to get some additional guidance with my planner which is almost identical to this situation for the most part. In additional to daily tasks, I will also have weekly and monthly as well. I don't believe I will have to much issues there based off your great instructions! You mentioned the Assigning of the tasks in the thread and the complexity that may surface with doing so. My "template" has the User assigned within the task itself already in which some tasks are assigned to an individual user and the remaining assigned to two users who essentially "share" the task to ensure it is completed each day and either user can mark the task complete for those. Before I go down the rabbit hole with this I was hoping you may be able to shed some light on if I would be okay to proceed as outlined here in the thread or is there another avenue you recommend to try? Any insight would be most welcomed! Thanks in advance!

@Anonymous 

Hey there.  So, the way you have it mapped out should totally work.  If you bump into any issues, go ahead and post a new thread in the forum (tag me so I don't miss it 🙂 )

 

Good luck!

-Ed

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (800)