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
As you can see in the image, it fails the condition:
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?
Solved! Go to Solution.
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.
You have to insert "Get message details" action before the condition and use plainTextContent value.
.
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.
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.
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
Glad to know that. Good luck!