Flow Office 365 Yammer

Using Flow with Yammer’s All Company / All Network feed

The trouble is Flow does not except a Group ID of zero in the new message trigger so this post shows a way to work with those groups.

In a previous post, using Flow to monitor activity in Yammer, I demonstrated how you could use Flow to monitor Groups you had access to. Those of you who are familiar with Yammer know that the All Company (as used in your Home Network) or All Network feeds (as used in External Networks) have a numeric id of zero (0). The trouble is Flow does not except a Group ID of zero. There is an active UserVoice entry to change this.

Behaviour of the Group trigger

The Flow trigger allows you to enter zero (0) using the Custom value option:

The image shows the When there is a new message in a group trigger. There is a drop down in the Network Id field that allows you to enter the Group ID as a number
Adding a Group using its ID

Flow allows you to enter a value of zero (0) without reporting an error:

With the Group ID of 0, the Flow Checker does not report an error
Group ID set as zero (0) with no errors or warnings

In fact it does not validate the Group Id until you save and exit the Flow. This applies for any ID you enter. The error is reported on the home page for the Flow:

Flow error message: There's a problem with the flow's trigger with a link to see details
“Houston we have a problem”

Following the see details link or editing the Flow reveals the issue:

Flow trigger with a NotFound error.
NotFound error (an improvement would be to say what is not found)

Accessing All Company or All Network feed

When there is a new message in my followed feed trigger
When there is a new message in my followed feed trigger

The alternative is to use the When there is a new message in my followed feed trigger and filter that for instances where the group_created_id item is null. If you do not filter for null then the Flow will be triggered for every message in your Company or Network posted in groups you are following. This works both Home and External Networks.

Extract of the returned JSON showing the group_created_id field for a message posted in All Company.
group_create_id item in the JSON returned for a message posted in All Company / Network

The key is to process the JSON and filter for instances where the item value is null. I covered processing JSON and condition actions in the previous post using Flow to monitor activity in Yammer. You can use a Terminate action to prematurely exit a Flow when the condition is not matched.

Condition with a Terminate with the status of Cancelled action in the Yes branch
Terminate with the status of cancelled

There you have it a method for monitoring the All Company or All Network feeds using Flow. I must end with a caveat. This will only work as currently Yammer automatically subscribes you to the All Company or All Network feeds. Hopefully the Flow trigger will be updated before Yammer changes this! VOTE now!