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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,921)