cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
drknight
Level: Power Up

Evaluate a condition based on a Trello label value

I am trying to create a condition in a flow that directs the flow based on the value of a label on a Trello card, but can't seem to get the condition logic correct. Any suggestions?

 

I have used 'Get a card by id' to get the card details and I know both the color and name of the label I want to match, but cannot work out which field(s) on the returned card to check and how to format the logic expression.

5 REPLIES 5
Super User
Super User

Re: Evaluate a condition based on a Trello label value

Can you publish a screenshot of the flow and a screenshot of the flow run history that you have got so far?

drknight
Level: Power Up

Re: Evaluate a condition based on a Trello label value

Hi - this is the current flow and conditional expression. The last run failed at calculating the condition because of the data types I'm using, with the error:

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2465': 'The template language expression 'equals(items('Apply_to_each_4')['Label_color'], 'yellow')' cannot be evaluated because property 'Label_color' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'.

 

I want the condition to evaluate "Does the card have a yellow label?", or "Does the card have the 'Do Work' label?"; I know both the color and name of the label I want to check, just not how to format the expression.

 

 

Flow.JPG

Super User
Super User

Re: Evaluate a condition based on a Trello label value

I think I saw a similar problem earlier today.

 

I think that the Apply to each fro is giving an array back. 

 

Can you put a compose action inside the Appl to each 4 and cp[y the "Cards in List..." inot that compose. Then see what the json looks like in the run history. If it starts with [ and ends with ] then you are lloking at an array and you will need to either add another apply to each or se3lect the first item (if there is only one) with [0]

 

 

 

 

Super User
Super User

Re: Evaluate a condition based on a Trello label value

I just completed a post on this nested array issue.

 

https://veenstra.me.uk/2018/11/13/microsoft-flow-single-item-nested-arrays/

drknight
Level: Power Up

Re: Evaluate a condition based on a Trello label value

The output is not an array, it is just the Label id in string format. 

 

I have the array of all labels available from 'List labels of a board', which provides the Label ids as well as colors and names of each label used in the board. What I don't know how to write is an expression that finds the label id from a name or color. I could then match it to the label id from the card. 

 

I can probbaly work it out from this expression, which I suspect is reasonably simple, I just don't know the syntax of forming these expressions. Otherwise I'll just do it manumatically, but thanks for the help so far.

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 (Last 30 Days)
Users online (4,870)