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

Trouble Getting Planner Bucket Name and Plan Name

Hi,

 

I am trying to get send a teams message when a plan is completed, which I am able to accomplish. The problem is that I want to include the plan name and bucket name of the completed plan, but I can't figure out how to do that. Below are pictures of my flow. I am currently trying to take the Plan ID output from "When a task is completed" and compare them to the plan IDs output from "List plans for a group", and when they are equal is passes to "Compose 2" where it is able to get the Title of the plan.

 

This seems because if I execute the flow I am able to see the correct value is in the compose; however, even with the identical setup the flow does not seem to work for the bucket.

 

Additionally, at the end in "Post a message as the flow bot to a user 2", I am not able to access the output from compose! If I place the dynamic content "Current Item" from either the "Get Bucket Name" or "Get Plan Title" I get this error message in the red bar (bottom of this post) when I attempt to save or test.

 

image.pngimage.png

 

Error message I get when I attempt to save/test my flow:

image.png

1 ACCEPTED SOLUTION

Accepted Solutions
efialttes
Super User
Super User

Hola!

THe problem is, you need to declare variables.

I would an 'Initialize variable' action block on top of your flow, just after the trigger, let's call it 'myBucketName', type string, value empty.

THen I would an 'Initialize variable' action block also on top of your flow, just after the trigger, let's call it 'myPlanName', type string, value empty.

 

Now, on the true branch of 'Condition 2' inside 'Get plan Title', I would add a 'Set variable' action block, name myPlanName, value the same one you assigned to 'Compose 2'

 

Now, on the true branch of 'Condition' inside 'Get Bucket Name', I would add a 'Set variable' action block, name myBucketName, value the same one you assigned to 'Compose'

 

Finally, you can assign both variables as part of your 'Post a message...' body

 

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
efialttes
Super User
Super User

Hola!

THe problem is, you need to declare variables.

I would an 'Initialize variable' action block on top of your flow, just after the trigger, let's call it 'myBucketName', type string, value empty.

THen I would an 'Initialize variable' action block also on top of your flow, just after the trigger, let's call it 'myPlanName', type string, value empty.

 

Now, on the true branch of 'Condition 2' inside 'Get plan Title', I would add a 'Set variable' action block, name myPlanName, value the same one you assigned to 'Compose 2'

 

Now, on the true branch of 'Condition' inside 'Get Bucket Name', I would add a 'Set variable' action block, name myBucketName, value the same one you assigned to 'Compose'

 

Finally, you can assign both variables as part of your 'Post a message...' body

 

Ánimo!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



This worked! I've been banging my head against the wall and you swooped in and fixed my problem in a few very clear sentences, thank you!

 

You have also given me a desire to learn more about what I just did and why it worked.

 

Thank you again!

@enriquezmrk 

Thanx for your kindness.

The point is, Compose inside an apply to each will take a different value on each iteration of the loop.Since you added inside a condition, it will take value null on each iteration the condition takes the false branch. And it will take a sting value on each iteration the condition takes the true branch.

 

That's the reason whywhen you open 'Dynamic content menu' from an action block out of the loop, it does not show 'Compose'.

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hey @enriquezmrk , could you post flow steps? I have the same problem with getting a Plan name. Plan ID available only. Muchas gracias

 

enriquezmrk
Frequent Visitor

@jozefko : Here is the entire flow. May be better ways of doing some things but it works for me.
enriquezmrk_0-1613657224749.png

 

enriquezmrk_2-1613657293234.png

enriquezmrk_3-1613657331023.png

enriquezmrk_4-1613657349371.png

 

enriquezmrk_6-1613657399801.png

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,602)