[This post is probably less about creating a Twitter out of office service and more about an illustration of the power of Yahoo Pipes (and embedding flickr images with notes), I’ll let you read and decide]
Whilst the majority of twitter users will probably never need to setup a email style ‘out of office’ messaging service to respond to ‘@replies’ because they are never that far away from their timeline, I sure there are emerging cases where certain twitter accounts might need this feature. In particular, I thinking of something like a class twitter account is being used to send notifications (you might like to read this post on free SMS broadcast via twitter), curate discussions or one of the many other ways you can teach with twitter (compiled by Steve Wheeler).
In this scenario we want to respond to ‘@replies’ (tweets directed at you from other users), with a message to indicate that your won’t be able to immediate respond. I did a quick ‘Google’ to find if anyone had setup a ‘Twitter – Out of Office’ service and couldn’t see anything (which probably suggests no-one needs this service or they just haven’t thought of it yet).
Starting with the Twitter Advance Search you’ll see there are a number of options to search for tweets based on keywords, people referenced and dates (as well as some other options). So it is very easy to setup a search which will filter messages sent to a user between dates, tweaking to remove tweets which might include RTs or via. Here is an example which ignores RT and via to mhawksey since 29th May until 29th May (twitter search is limited to the last 7 days so if you are trying this after the 5th June you won’t see any results, but hopefully you get the idea).
So it is easy to setup a search which can identify possible messages you might want to send an out of office response, but how can we use this information? The key is that Twitter provides a feed for the search query. That is it provides the data for the search results in a machine readable format, RSS.
The next step in to use the data from twitter to generate a response message. The best service I know to do this is Yahoo Pipes. Pipes is a free service which provides an nice graphical interface for manipulating data like RSS.
Below is a screenshot of a pipe output I’ve created which takes a twitter username, date range and custom response message and manipulates it to produce a unique response message.
If you are interested in how this pipe works you can click here for the Twitter – Out of Office (Date Range) pipe [Update: this new pipe includes the option for office hours] and view the source or the image below contains hotspots which explains what the blocks are doing:
The final step is to get your twitter account to send the ‘out of office’ message. This is where RSS comes to our rescue. As well as Yahoo Pipes being able to manipulate RSS it can also output in this format as well. By copying the ‘Get as RSS’ from after you run your pipe you can use this with one of the RSS to Twitter services (currently I use either twitterfeed.com or the ‘Publicize –> Socialize’ option in Feedburner). It will look something like:
When setting this up choose to tweet ‘Title only’ and untick ‘include link’ or ‘post link’. Once you’ve created your RSS to twitter service you can also reuse it for future holidays. To save you going back through running the pipe you can just edit the feed url with new start and finish dates.
There are a lot more things you can do with Yahoo Pipes. For example, here is another pipe which uses as named day to create a recurring out of office message (notes on this pipe are here).
Hopefully you get the idea of what is possible. If you are interested in more ‘Pipe’ manipulations I would recommend having a browse through Tony Hirst’s offerings.