web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is there a way to use ...
Power Automate
Unanswered

Is there a way to use "When there is a new message in a group" for Yammer Connection on specific text in message.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there! 

 

Just delving into Power Automate Flows and am trying to setup a Flow for when a message has specific words in them. I'm trying to use the Trigger Condition @contain() but I'm not sure my syntax is correct for the string itself. Any insight on what I should be using? Is this the wrong approach?

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-litu-msft Profile Picture
    on at

    Hi @ianber,

     

    We should configure the trigger contains condition as below:

    @contains(triggerOutputs()?['body/content_excerpt'],'Keywords')

    Screenshot 2021-04-20 151548.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • ianber Profile Picture
    Microsoft Employee on at

    Thanks so much for the response! This worked brilliantly!

     

    Quick follow-up question: If I wanted to put more than one keyword, does the "contains" function allow for that? Or do I need to use @And(contains())? So, as an example, I only want it to fire if the post says "today" and "blue".

  • VictorIvanidze Profile Picture
    13,073 on at

    Combine 2 "Contains" with one "And".

  • ianber Profile Picture
    Microsoft Employee on at

    That's what I was thinking, but I also just read in some documentation (https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#contains) that this function is case sensitive. So, that makes I actually need to check and see if one of four different possibilities is true. 

     

    Basically if string contains

    Today AND Blue

    OR

    Today AND blue

    OR

    today AND Blue

    OR

    today and blue

     

    So would that mean I needed the following operation?

     

    @or(and(contains(triggerOutputs()?['body/content_excerpt'],'Today'), contains(triggerOutputs()?['body/content_excerpt'],'Blue')), (and(contains(triggerOutputs()?['body/content_excerpt'],'Today'), contains(triggerOutputs()?['body/content_excerpt'],'blue')), (and(contains(triggerOutputs()?['body/content_excerpt'],'today'), contains(triggerOutputs()?['body/content_excerpt'],'Blue')), (and(contains(triggerOutputs()?['body/content_excerpt'],'today'), contains(triggerOutputs()?['body/content_excerpt'],'blue')))

  • VictorIvanidze Profile Picture
    13,073 on at

    You can make it much easier using toLower function:

    and(contains(toLower(triggerOutputs()?['body/content_excerpt']),'today'), contains(toLower(triggerOutputs()?['body/content_excerpt']),'blue'))

  • ianber Profile Picture
    Microsoft Employee on at

    Excellent! I wasn't sure if toLower would work, so this is MUCH easier. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard