skip down to the 12 comments

Twammer, sending stuff from Twitter to Yammer

I use Twitter. I don’t really post much, but I do like to dip in and hear what my friends are doing. Yammer is like a private Twitter for companies. We have just had a network set up for the BBC, which is interesting. Again, I like the idea of posting what I am doing and dipping into what other people are doing around the organisation.

So you can see my problem, I’m doubling up here a bit. When I post something to Twitter, and I think it would be relevant for work too, I don’t want to have to open a different interface and post it again. Now there are services like which will sync every site you belong to, but I what to decide what gets posted at work and what doesn’t in this instance. The simple answer is to build something that looks at my Twitter feed and if it sees anything new, then posts it off to Yammer. My friend Mr Humfrey does that very thing. I wanted more than this though, I wanted to filter, plus I wanted to make it easy to use, so I have written this very simple app that does the job:

  1. Read my Twitter feed every n minutes for changes
  2. Keep messages with my chosen keyword
  3. Remove keyword, and send off to Yammer

Twammer usage:

# Display help
./twammer -h
# check Twitter messages with last 5 mins (default)
# filter by #bbc but don't send anything to Yammer
./twammer -t 47983 -u user -p pass -f bbc -q
# check Twitter messages within last 10 mins
# send anything to Yammer. Show output
./twammer -t 47983 -u user -p pass -d 10 -v

This is designed to be run as a cron job. You must also make sure you run it at the same interval as the –delay in the app. Here’s what my crontab looks like:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/duncan/bin/twammer -t 47983 -u user -p pass -f bbc > /dev/null

[UPDATE] Changed to using the correct API instead of scraping the RSS

There have been 12 responses to this post.

  1. Daniel Morris

    Sending Twitter to Yammer is a bad idea, don’t you think?

    Twitter is a public thing, even if its work-related. Yammer is supposed to be a walled garden, company-specific thing.

    Sending one to the other crosses the streams! …and we all know you don’t want to do that :D

  2. Duncan

    @daniel: Thanks for the comment, but I don’t agree. I have things I want to mention to my friends who don’t work for the BBC, that would also be helpful to people at the BBC. Like I mention in the post, sites like push everything to Yammer. This is what I did not want. This app will only post things of my choosing. Also, anything too BBC specific I would post manually to Yammer. As an aside, Twitter is only really a public thing if you choose to make it so.

  3. Julian

    Hi Duncan

    Love the idea, and credit to you for making it work.

    Thought about copying and adapting for own use, but found the custom trigger function on which feels more useful to me – did you examine that first, or have they only just released it?



  4. Duncan

    @Julian: I hadn’t seen this, although I don’t have a account. Do you know if you can indeed customise the trigger to filter the message content to your choosing?

    As an aside, I need to adapt the script as I have found out that Twitter let you make calls like this:

    Which is much better than parsing the RSS feed. Just need 5 mins spare to do it :)

  5. Julian Elve


    Don’t think it lets you filter, but it allows you to define a keyword that selectsd a subset of your defined networks to post to.

  6. Julian Elve

    Hi Duncan

    Don’t think allows filtering. The custom triggers are defined to post to a subset of your sites, and accessed by a keyword in the post



  7. Akhil Bansal

    Exactly what I am looking for

    Thanks a lot

  8. Andrew Chambers

    Yes but how do I do this as an ordinary user? I can’t run cron jobs…

  9. Duncan

    @Andrew, the quick answer is you can’t. This script was designed to be run via cron, as twitter has no callback facility I’m aware of.

  10. Kris Getchell

    This is a great idea. I look after an ePrints repository and we found it useful to send out Twitter alerts when the repository was updated. Being able to feed these into Yammer is great! Thanks for the app :)

  11. Steven Johnson

    You can enable your yammer account to post your tweets from twitter. Than you only need to add the #yam hashtag to your tweets and they will be posted. No seperate application is needed. Under the “edit profile” option their is a field titled “Twitter username”. Click the “learn more about Twitter integration” URL next to this field to learn more.

  12. Rare Records

    How about a script to run a cron to post to

back to the top