Main navigation

How to Create a Useful Twitter Retweet Bot

Twitter can be used in various, almost countless ways. In this post I am sharing a tip on how to create a useful Twitter RT bot that can be used to collect various Tweets around a keyword or a hashtag and retweet them. And before you start throwing stones at me calling me a Twitter spammer, let me give just a few examples of how this bot can be used to create real value:

Think of a Twitter RT bot that will be used to collect Tweets around some SEO conference. Thus all people who want to follow live updates from many members won’t need to keep track of hashtags and keywords associated with the event – all they need is to follow your bot.

Or, say, you want to introduce your own cool hashtag and get other people to use it (#FirefoxFriday for example) but you want to filter out all retweets and give people the way to only follow real first-hand Tweets – a Twitter bot is the best option to go!

So, I guess I made it clear why you might find this tutorial handy. Now let’s see how to create one:

Create a Yahoo! Pipe

1. Choose the keywords / hashtags to retweet

Once you decided to create a Twitter bot, I suppose you already have the topic. So what you need to do now is to create a new hashtag to filter the Tweets (or just use the one you want to retweet);

2. Use Yahoo! Pipes to create a feed

The reason I use Yahoo! Pipes to create a feed is that Twitterfeed (I am going to use to auto-tweet) does not allow to use Twitter-based feeds and also Yahoo! Pipes offer some cool options allowing to customize the feed. So:

Now, go to Yahoo! Pipes and click “Create a pipe”. Drag the “Fetch feed” item from the left-hand panel and provide your Twitter search RSS link. You should see the feed output at the bottom of your screen.

Filter your feed. Now, there might be plenty of retweets of the initial Tweet using your key hashtag – and you don’t want your bot to repeat one and the same update again and again. So you can go ahead and filter out all Tweets containing “RT” ( “Retweet”, “Retweeting”, etc):

Drag the Operator > Filter pipe from the navigation and add the following:

Now, connect all three pipes (feed, filter and output) together and you are done!:

You can also give credit to the initial update author (RT @username) for the bot’s update to look like this: [the initial message here RT @tweet-author]. This part is a bit more complex.