Correct syntax to reference content type in Trigger Condition (Flow)

Copper Contributor

I would like to be able to add a trigger condition to a flow so it only runs on certain content types. I read that content types are now supported in Flow, but there are very few resources that I've found to help me use them with trigger conditions. 

 

@equals(triggerBody()?['{ContentType}/Name'],'BusPassRequestProcessing')

 

(Source: https://threewill.com/power-automate-flows-random-tips-tricks-and-pain-points/)

 

I tried the formatting that matches my other (working) trigger condition:

 

@equals(triggerBody()?['ContentType']?['Name'],'BusPassRequestProcessing')

 

(Source: https://sharepoint-tricks.com/change-a-content-type-using-powerautomate/)

 

That one passes the Flow checker but doesn't work, as it should prevent the flow from running and instead I was getting an email every minute.

 

I did find a source saying I could use the content type ID, which I will try, but that isn't user friendly and honestly I'd like to be able to use the name.

 

(Source: https://thrivenextgen.com/microsoft-power-automate-flow-trigger-conditions/)

 

I know I can put a conditional step in as a workaround, but I'd really like the flow to not run at all if it's not the right content type, since there's a quota on flows. 

 

Sidenote, I'd give my right arm for an actual how to for Trigger Conditions. I'm not a programmer and it all looks like gobbledy-**bleep** to me, and the Microsoft write-up is woefully inadequate.

0 Replies