Using Yammer to Manage Groups More Efficiently

I really love the collaboration that Yammer can provide. You can easily create a topic focused group and build a self-driven community around it. However, when it comes time to actually trying to do something outside of Yammer, it can be clunky trying to build a membership list you can use to e-mail, send Calendar Invites, share Google Docs or give Doodle Polls to.

Fortunately Yammer provides a relatively robust API which we can leverage to help make this chore less aggravating and hopefully more accurate than doing it by hand.

Step 1: Determine Your Yammer Group ID.

This can be accomplished by navigating to your group, the URL will look something like: https://www.yammer.com/stonybrook.edu/#/threads/inGroup?type=in_group&feedId=2172003 (for this example we used the DoIT group)

That last part, the “FeedID”, is really your Group ID.

Step 2: Making the API Call.

We are going to make an HTTP get to (https://www.yammer.com/api/v1/users/in_group/:Group_Id.json) based upon the information we found in yammers developer pages: https://developer.yammer.com/v1.0/docs/usersin_groupidjson

We simply substitute :Group_Id.json with our Group from Step 1 ala: https://www.yammer.com/api/v1/users/in_group/2172003.json

Only authenticated users can make API calls. The API request also seems to respect the privacy settings of the group, it seems that non-group members can make the API call on public groups, but not on private groups. This is in-line with how the Web UI works, but I am a little concerned that someone _COULD_ exploit this to harvest e-mail addresses / membership info.  

TL;DR if your following along and don’t see any content in the JSON feed, make sure you are signed into Yammer and that you are a member of the group you are trying to query. 

Step 3: Yikes, That JSON’s UGLY!

While JSON is meant to be human readable, many browsers just output is as a block of unformatted text, making it a bit difficult to read. If you use Chrome you can grab the following plugin https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en similar plugins are available for IE and FireFox but your on your own for those.

Step 4: Neat, But How Can I Get This In a Format I Can Use?

For my needs, I really just wanted to get a list of e-mail addresses and while I _COULD_ write some javascript to output only the fields I cared about, writing code takes time so off to Google I went and 2 minutes later I found this JSON to CSV converter: http://konklone.io/json/ which yielded a CSV file I could then open in excel or import into Google Sheets. From their I copied the column of e-mail addresses, pasted them in the attendee part of my google calendar invite and sent it on its way.

json-csv

For some reason, I did notice that 3 out of the 41 people didn’t have an e-mail address, not really sure why that would be, but judging by their names, I imagine that accounts were Old School Yammers who’s accounts were established prior to getting Single Sign-On Authentication in place. In any event, it was pretty easy to look up the three names rather than cross-list 42 of them.

 

Leave a Reply

Your email address will not be published. Required fields are marked *