web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Flow to copy a t...
Power Automate
Answered

Using Flow to copy a template bucket

(0) ShareShare
ReportReport
Posted on by 14

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-f605814734df

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Copy-Planner-task-from-one-plan-to-another-towards-the-same/ba-p/180470

 

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

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @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-

  • Eputnam Profile Picture
    14 on at

    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.

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    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.

  • Eputnam Profile Picture
    14 on at

    @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?

  • Verified answer
    Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    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

  • Eputnam Profile Picture
    14 on at

    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.

     

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    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.

  • Eputnam Profile Picture
    14 on at

    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.

  • Eputnam Profile Picture
    14 on at

    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.

  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @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. 🙂

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard