cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nonielb
Regular Visitor

Keyword flow different subtriggers

Hello,

 

I'm trying to create special replies based on an initial trigger:

Person A posts "hello team" in the channel and gets an automatic response;

Person B posts "hello everyone" in the same channel and gets a different response.

 

In this case, "hello " is the Flow's keyword that triggers it, but then if the next word is "team" they'll get a "post a message to teams" and if it's "everyone" they'll get another.

 

I'm trying the Apply to each action, but none of the condition options I'm trying is passing the condition. For reference, see the image. Conditions I'm trying:

Current item OR;

Item OR;

Message ID

"contains" team

flow1.png

As you can see in the image, it fails the condition:

flowerror.png

 

I have changed the actual expressions to the generic "hello team" for confidentiality. For reference, I have tried without checking the conditional boxes and got the same result.

 

Any thoughts?

1 ACCEPTED SOLUTION

Accepted Solutions
VictorIvanidze
Community Champion
Community Champion

In Condition use 

outputs('Get_message_details')?['body']?['body']?['plainTextContent']

 

I do not understand why did you enter an endless loop. Please show your flow.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

View solution in original post

6 REPLIES 6
VictorIvanidze
Community Champion
Community Champion

You have to insert "Get message details" action before the condition and use plainTextContent value.

.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Thanks. I used "Get message details" and added the "body" in the condition, but it still fails. I checked the actual details generated and can see the plaintextcontent has the correct info. How can I set the condition to use the plaintextcontent instead of the whole body? And even if it is using the body, shouldn't it have returned true?

Ok, an update:

Within "apply to each" I set up "Get message details" and used its resulting "body" to "html to text" and then used html to text's plain text content in the condition. Did it work? Yes. Problem? It entered a loop lol. I sent one "hello team" and only stopped receiving the custom message when I disabled the flow entirely.

VictorIvanidze
Community Champion
Community Champion

In Condition use 

outputs('Get_message_details')?['body']?['body']?['plainTextContent']

 

I do not understand why did you enter an endless loop. Please show your flow.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Nice! This solved things for me. Thank you so much!

 

As for the loop... I have no clue. It was probably the sheer amount of actions I had lol

VictorIvanidze
Community Champion
Community Champion

Glad to know that. Good luck!

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,620)