Build it with Microsoft Flow: Get a notification when a “watch word” is mentioned in Yammer

yammerIf your organization uses Yammer to drive information sharing and employee knowledge transfer, you have a potential treasure trove of great content. But staying up-to-date on Yammer conversations can be tough, particularly when you’re running from meeting to meeting. It’s easy to miss key Yammer posts, even if you subscribe to email notifications.

Fortunately, Microsoft Flow can help! Let’s say you want to monitor a particular Yammer group for one or more “watch words.” When a message that contains the watch word is posted on Yammer, you’d like Microsoft Flow to send you an email notification. This functionality enables you to audit Yammer groups for the content you’re most interested in.

Here’s an overview of what this flow looks like:

Yammer watch word-01.png

And here are the steps to re-create the flow:

  1. Create a new flow from blank (aka not from a template).
  2. Add the trigger When there is a new message in a group.
  3. In the Group Id field, select the name of the Yammer group you want to monitor.
    Note: This flow doesn’t monitor multiple Yammer groups at once; it triggers to run when a new message is posted in a single Yammer group. If you’d like to run this watch word flow across multiple Yammer groups, you’ll need to copy your completed flow and create a new flow for each group you want to monitor. The process for copying your finished flow is provided in step 15. 
  4. In the Network Id field, select the name of your Yammer network.
  5. If you’d like your watch word email notification to include the name of the person that posted the Yammer message, add the Get user details action. In the User ID field, add the Message List Message Sender field.
  6. Add the Get my profile action. This action obtains the SMTP email address for the current user (e.g. john.doe@mycompany.com). You’ll use this SMTP email address to configure your email notification.
  7. Add a Condition action.
  8. In the Value field, add the Message List Message Body Text field.
  9. Change the is equal to field to contains.
  10. Type your watch word(s) in the Choose a value field. In the example flow shown above, my watch word is PowerApps.
  11. Add an action in the If yes box. Since I wanted to send an email notification when my watch word was used, I added the email action.
  12. In the To field of your email, insert the Get My Profile Mail dynamic content.
    Note: You may need to select “See more” under the Get my profile header to see the Mail content.
  13. Add additional details for your notification (e.g. subject line, email verbiage, etc.).
  14. Save and test your flow.
  15. Optional. If you’d like to set up your watch word flow for a second Yammer group, follow these additional steps:
    1. Go to your flow’s information page.
    2. Click on the More dropdown and select Save As.
      Yammer watch word-02.png
    3. Specify a name for your copied flow and click Save.
    4. Return to your My Flows page and edit your newly-copied flow. Update the Yammer group identified in your trigger, save the flow, and turn on the flow.
    5. Repeat step 15 for each Yammer group you want to monitor.

Now that my flow is built, I receive an email notification like the one shown below each time the watch word PowerApps is mentioned in my Microsoft Flow Yammer group:
Yammer watch word-03.png

Sharing your new flow:
Now that you’ve created your flow, it’s time to think about sharing it with others in your organization.

Credits (and a few words of encouragement):
If you’re working with Microsoft Flow and are having a hard time figuring out how to build the workflows you need, don’t despair! When I first started trying to build this “watch word” flow, I got completely stuck. I couldn’t figure out how to build it without complicated formulas or JSON. Many thanks to Jon Levesque, Marcel Haas, and many others on Twitter for jumping in and teaching me a better way to go about it!

9 comments

  1. Hi! I used a “Send a Reminder” template. Can you tell me if I shared that flow with a member of my team, the step that has the “Get My Profile”, will it then remind all of us or just me who built it? Thanks!!

    1. The “Get My Profile” action will get the profile of the person who the flow is running under. If you send a flow to a member of your team, they’ll need to instantiate that flow as their own before they can turn it on. As a result, the flow will be running as them, not as you. So you should be all good.

      1. Thank you for the quick response. I’m new to this so pardon me for my ignorance! How does the other user ‘instantiate’ the flow?

  2. Hi, really helpful post, thank you.

    Can this to be used to notify for several watch words within the same Yammer group?

    If I add a second (or third, fourth etc) Condition at step 7, and set the Condition to be ‘OR’ I am hoping it will notify me of the any watch words entered in the Value fields. Is that correct?

    Thank you

  3. Hi, how can I get the id of a specific user? for later when I publish a new post in Yammer I can tag that user (The user varies, it will not always be the same)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s