Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Bucket and task creation with variables from switch case

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I've written a Flow that does a couple of things including creating a bucket and some predetermined tasks. The flow is triggered by adding an item to a SharePoint List. I have a switch case that depends on a company product code and a few variables. Each product has their own Team, and associated Planner; right now I'm working with 3 Teams and 3 Planners.

 

My issues:

- I'm using the condition 'if a variable = true' in a switch code then create a bucket. However in the run history, the output always false, so no buckets are made.

- I anticipate having an issue making tasks as well because the bucket id will be the newly formed bucket, and I don't know how to extract that id and give it to the task. I thought that maybe I needed a 2nd switch case to set all the variables, but not sure if that's the right direction.

 

Any advice? Thanks in advance!

  • Community Power Platform Member Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    I get an authentication error when I select accept as solution, and I've tried 3 different browsers, but this absolutely did work. 

  • v-alzhan-msft Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi @Anonymous ,

     

    If your problem has been solved, please 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,

    Alice

     

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case
    Thank you so much!
  • v-alzhan-msft Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi @Anonymous ,

    Yes, it is ok.

     

    Best regards,

    Alice       

     

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi Alice,

     

    That id shown in your picture wasn't showing up for me before, I think because I had it under a switch case in a condition, and task was in a separate condition. I combined the two, and it looks like it works. Thank you for all your help! It has been fantastic.

     

    Final question, is it okay that all of this is nested under one condition?

     

    Capture.JPG

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

     

    Please choose the Id dynamic content from the Create a bucket action:

    1.png

     

    Best regards,

    Alice       

     

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

    Hi @Anonymous ,

  • Community Power Platform Member Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    I ended up putting another switch case in since I needed 3 group and plan ids, plus switched the initialize variable position like you suggested and I have buckets now!

     

    My last thing is, how do I now create the tasks? The 'create a task' needs a bucket ID, and all I have is a bucket name from my newly formed bucket. Capture.JPG

  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi @Anonymous ,

     

    So what is the issue in your flow so your flow couldn't work?

    Have you checked the flow run history? Could you please share a screenshot of it?

     

    I see you flow and find an error in it:

    You should check the Create Folder variable is equal to True instead of true, since you have set the variable to True in the set variable action.

     

    1.png

    2.png

     

    Best regards,

    Alice       

     

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi Alice,

     

    Here's the full Flow.

     

    I would like to use the Flow as follows:

    I have products A, B, C, etc. and would like to be able to manage their product deviation status with tasks. Each product has their own Team and Planner. When a product deviation is created in our SharePoint list, I need the Flow to create a bucket in the respective product Team's Planner. The name of the bucket should be based on a SharePoint field (deviation number and description) I then want to create a standard list of tasks to populate that bucket. The task title should have the deviation number in it (Sharepoint field), plus whatever the task is (ex: risk assessment drafted).

    Capture.JPGCapture.JPGCapture.JPGCapture.JPGCapture.JPGCapture.JPG

     

     

     

     

  • v-alzhan-msft Profile Picture
    on at
    Re: Bucket and task creation with variables from switch case

    Hi @Anonymous ,

     

    Multiple questions:

    1. Please share the full screenshot of your flow in order。

    2. You say You use the Condition to check if the variable is equal to true, but I don't see any action in your flow that would set the variable to true.

    3. What is the requirement in your flow, could you please explain more details? 

     

    Best regards,

    Alice       

     

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

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1