cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nonielb
New Member

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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,266)