cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
frederikbisback
Level: Powered On

Getting bucket Name

I have a planner bucket list and based on a create task in a plan, I receive a bucket ID where it has been created.

How can I get the Bucket Name based on the two items

 

* Buckets List Shown as here below:

 

[
  {
    "@odata.etag""W/\"JzEtQnVja2V0QEBAQEBAQEBAQEBAQEBASCc=\"",
    "name""BUCK03",
    "planId""w_4V8-0QJE6Wl_TWKvRmipYAB2MC",
    "orderHint""8586618331113434567P6",
    "id""IRJ08qbj7kOw2tDzThTVgJYAG-Tf"
  },
  {
    "@odata.etag""W/\"JzEtQnVja2V0QEBAQEBAQEBAQEBAQEBASCc=\"",
    "name""BUCK02",
    "planId""w_4V8-0QJE6Wl_TWKvRmipYAB2MC",
    "orderHint""I#",
    "id""x_yNrLZbLEm4v0kniek0X5YAI0qi"
  },
  {
    "@odata.etag""W/\"JzEtQnVja2V0QEBAQEBAQEBAQEBAQEBASCc=\"",
    "name""BUCK01",
    "planId""w_4V8-0QJE6Wl_TWKvRmipYAB2MC",
    "orderHint""[v",
    "id""_WBroQk8R0ah-yiAl1fJfZYAPvUV"
  }
]

 

 

* Based on the create task I get a Value Bucket Id that containce one of those three.

 

How I can match the bucket list to get the name of the bucket?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Getting bucket Name

Hi @frederikbisback,

 

Do you want to get the name of the bucket to which the task you just created belongs?

You could use Get a task to get the id of the Bucket to which the task belongs.

Use List buckets to get the value of all buckets, including id, name.

Use Condition to determine whether the id value obtained by the Buck id and list buckets obtained by Get a task is equal, get the expected bucket id, and then output the corresponding bucket name.

You could also use variables to save this name.

Image reference:

35.PNG

Best Regards,

Barry

Community Support Team _ Barry
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

7 REPLIES 7
Community Support Team
Community Support Team

Re: Getting bucket Name

Hi @frederikbisback,

 

Do you want to get the name of the bucket to which the task you just created belongs?

You could use Get a task to get the id of the Bucket to which the task belongs.

Use List buckets to get the value of all buckets, including id, name.

Use Condition to determine whether the id value obtained by the Buck id and list buckets obtained by Get a task is equal, get the expected bucket id, and then output the corresponding bucket name.

You could also use variables to save this name.

Image reference:

35.PNG

Best Regards,

Barry

Community Support Team _ Barry
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

frederikbisback
Level: Powered On

Re: Getting bucket Name

Thanks, I was just stuck at the last option. It can continue. Thanks.
TrevorS
Level: Powered On

Re: Getting bucket Name

@v-bacao-msft This solution has normally worked great but sometimes I get an item output without the Bucket Name populated. Have you ever ran into this? 

Highlighted
dushyantb
Level: Powered On

Re: Getting bucket Name

@v-bacao-msft  You also get Bucket Id directly from the trigger itself.

Maybe it wasn't there when you posted the answer, but with that, you don't have to "Get Task".

TrevorS
Level: Powered On

Re: Getting bucket Name

@dushyantb the Bucket ID is the generated ID and not the Bucket Display name. What's worse is Flow doesn't handle variables and parallelism well so you'll have to wait for the "for each" loop or risk mixed up data in your output.

dushyantb
Level: Powered On

Re: Getting bucket Name

@TrevorS you missed my point. I know Bucket ID is not its name, but a unique identifier.

My point is, you dont need to use "Get a Task" to get the Bucket ID. It is included from the trigger itself, so you can use that to compare inside the condition step.

 

FH1000
Level: Powered On

Re: Getting bucket Name

i might be missing something, when i try this it gives me the name of the wrong bucket... any idea why?

 

I want to use the output from the condition in an email, but when i select value name for bucket list it will cycle through and use the last one in the email, how can i get only the bucket name from the condition published in the email?

 

sorted

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 316 members 6,025 guests
Please welcome our newest community members: