cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Create bucket after checking if it allready exists

Hello,

I'm trying to create Planner tasks from an Excel File by using Flow. I have one column named User-ID in the file. I would like to create a bucket for each User-ID in this column and then assignee the task to the bucket. How should I do to check if the bucket already exists before creating it and how can I assign the task to the bucket by name(User-ID)?

 

Is it also possible to remove a bucket who dosen't contain any task?

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Create bucket after checking if it allready exists

Hi @Mac22,

 

There are List buckets action to get all buckets and the List tasks action could get all tasks, you could compare the ID of the bucket with the list of tasks, if this bucket has a task, you can sign it in the excel file.

Annotation 2019-12-30 133321.png

 

Unfortunately, there is no action could delete the bucket directly, so you should delete the bucket manually if you find this bucket is empty.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Create bucket after checking if it allready exists

Since there are multiple buckets that may already exist and you need to compare them to multiple User-IDs, you will need to loop through each Bucket Name in the Plan to see if it matches any existing User-IDs.

 

Check Planner buckets against User-IDCheck Planner buckets against User-ID

 

 

 

 

If your list of Buckets and User-IDs keep growing, you may need to enable "Concurrency Control" on the "Apply to Each". This is located under the 3 dots and then select "Settings". This will allow thing to run quicker by running things in parallel.

 

Power Automate - Concurrency ControlPower Automate - Concurrency Control

 

 

 

Highlighted
Community Support
Community Support

Re: Create bucket after checking if it allready exists

Hi @Mac22,

 

There are List buckets action to get all buckets and the List tasks action could get all tasks, you could compare the ID of the bucket with the list of tasks, if this bucket has a task, you can sign it in the excel file.

Annotation 2019-12-30 133321.png

 

Unfortunately, there is no action could delete the bucket directly, so you should delete the bucket manually if you find this bucket is empty.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Community Support
Community Support

Re: Create bucket after checking if it allready exists

Hi @Mac22,

 

Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

Highlighted
Frequent Visitor

Re: Create bucket after checking if it allready exists

Thank you very much for your answers. It also helpt me realise that creating a new bucket wasn't the best solution, wouldn't be very user friendly in the end with 50+ buckets. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (1,817)