My Blog Guest

How to Create a Useful Twitter Retweet Bot

Create Twitter RT botTwitter 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.

Twitter  bot: fetch RSS

  • 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:

Twitter bot: filter

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

Twitter bot: connect

  • 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.

1.First, drag Operators > Loop Pipe and insert it before the “Pipe output” Pipe;

2. Now, drag String > String Builder Pipe right in the middle of the Loop Pipe and do exactly what is shown on the screenshot:

Twitter bot loop

You should see now that the feed output contains the URL to the initial author profile:

Twitter bot loop

3. Now you should cut the first part of the URL and make it @author. For that grab Operators > Regex Pipe and there in item.title replace http://twitter.com/ with RT @

Twitter bot replace

(!) Don’t forget to connect the last pipe with the other ones – so that in the end our Pipe looks as follows:

Twitter bot - Yahoo! pipe

And the output looks like this:

Twitter bot: output

Save the Pipe and grab its RSS.

Set up the Auto Tweets

All what follows is quite easy:

1. Create your new Twitter profile to publish the Retweets,

2. Connect it to Twitter Feed and set up the auto-retweets there:

Twitter bot: TwitterBot

Congratulations! You are done!

Can you think of any really creative uses of this tip? (Please don’t spam Twitter!)

The following two tabs change content below.
  1. 102 Responses to “How to Create a Useful Twitter Retweet Bot”

  2. Saved my day. Thanks for the post. Helped me a lot.

    By Thomas on Oct 28, 2010

  3. Followed these instructions and it does seem to work. The problem is that it retweets the entire feed and not just new tweets, which I was afraid might be the case. I am trying to set up a retweet stream for followers to use a specific hashtag to communicate community news and info. For instance they want to notify of a traffic accident to avoid, tweet the location using the hashtag and that is retweeted. Not continually retweeting older messages. Any ideas? Thanks!

    By Connie on Dec 4, 2010

  4. Hey, I’m trying to create a string like this:

    RT @

    I can ‘t get the to work, the message gets stuck together with the author name, can you help out?

    Example:
    RT @jonnyhey wtf is going on #wtf

    The correct what should be

    RT @jonny hey wtf is going on #wtf

    By Bemm on Dec 20, 2010

  5. Thanks for the effort but I think there’s a much better way to do that. There are some sites offering this kind of service as far as I know. What you’ve shared is helpful but it will eat up more time.

    By dee oneal on Dec 22, 2010

  6. You do need a lot of coding knowledge to create a proper bot right?

    By Outdoor BBQ Grills on Dec 29, 2010

  7. I’m wondering if twitter search feeds have changed since this was written — I’d love to implement what you’ve outlined, it’s exactly what I want, but I can’t get the twitter search feed to work — no activity displays when I click “refresh” in your very first steps, no matter what feed I try. When I subscribe to those same feeds with google reader, they show up fine.

    any help?

    By amy on Mar 11, 2011

  8. @Amy, Twitter search hasn’t changed. Maybe a temporal bug in Yahoo! Pipes? They are quite buggy recently. Maybe lack of funding…

    By Ann Smarty on Mar 14, 2011

  9. This is really very useful post. Thank you.

    By Web Design Stuff on Mar 14, 2011

  10. Works like a charm! Easy to alter to my needs. Thanks!

    By Jorgen on Mar 15, 2011

  11. This isnt working, Says that the RSS isnt valid. I wonder if this: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/1acd954f8a04fa84 has something to do with it. I know twitter had a huge argument about bots spamming them….

    By Sheffield Website Design on Mar 16, 2011

  12. one question…
    is the retweet IN REAL TIME?

    or is it retwitted every 30 min?

    By alejandro on Apr 1, 2011

  13. Hello Thanks for the post
    How can i block my own tweets i don’t want to be duplicates, i want to find my hash tag from others only!

    By Jay on May 6, 2011

  14. Yahoo! Pipes is awesome tools,thanks for this informative post.

    By Gray Stephen on May 26, 2011

  15. Your post inspired me enough to change my entire social media strategy really, not just twitter…

    Here is how I put to use the tips that you have given here. Create an archive of your tweets, then feed them to google reader, create an RSS feed of the tweets and push it to your twitterfeed account via yahoo pipes (alright you have covered that in your post). The fun begins here, there is a plugin for wordpress called the tweet old post plugin, which randomly sends tweets of your posts to your twitter profile.

    Just make a new twitter profile and push all your posts randomly (1 tweet per hour is the lowest frequency available) . Make a yahoo pipe of that account and use it in twitterfeed to push the hourly tweets to multiple twitter accounts, and before you know it, you are sending 24 tweets a day without looking cluterred and multiplying your twitter reach 24 times at the same time overcoming the global time barrier…

    Furthermore you can set your tweets from the pipe to auto feed to your linkedin account via twitterfeed and multiply your reach that many times. If you are a LION on linkedin then you will see huge value in this strategy. Continuously broadcasting tweets at regular intervals without requiring any other social media management tools like Hootsuite and buffer.

    coz if you have mixed followers, someone or the other will always be online to read your tweets, that way you are also optimizing CTR for links in tweets…

    By Rohan on Sep 19, 2011

  16. I think its no longer available, I can’t fetch a feed using yahoo pipes.

    By Tour Karimunjawa on Oct 4, 2011

  17. Hello, I just have a question as to whether or not this would work for an application I am looking into. I am trying to Retweet all tweets either Tweet’ed by other Twitter handles when mentioning this original handle/account

    ex. @Twitterhandle2: @Twitterhandle1 is great

    so that @Twitterhandle1 RT this.

    OR

    for the original Twitter handle/account to RT all tweets mentioning one hashtag

    ex. @anyTwitterhandle man i love this #greatidea

    so that @Twitterhandle1 RT any tweet (worldwide) that includes the hashtag @greatidea

    would either of these work with this RT bot?

    By Patrick on Oct 6, 2011

  18. My Twitter bot fails to add a space between the user name and the content of the tweet. They are all formatted like this:

    RT @UserNameThis is content…

    Should be
    RT @UserName This is content…

    So how do I get a space between user name and content?

    By MP on Oct 25, 2011

  19. Seems twitter no longer allows those RSS feeds for search terms. Anyone know a solution that works with the above solution?

    By Mike on Nov 3, 2011

  20. I just started using Yahoo! Pipes, and at first I must admit, it’s a bit complicated to use, but once you got the hang out of it, it’s pretty cool tool and very useful.

    By AML on Nov 25, 2011

  21. out of date post as twitter does not provide any RSS feeds from any user

    By rahul on Dec 5, 2011

  22. All the RSS feeds are live. They just removed the links but not the functionality: http://www.searchenginepeople.com/blog/twitter-search-rss.html

    By Ann Smarty on Dec 5, 2011

  23. Thanks for reply it was helpful

    By rahul on Dec 6, 2011

  24. Does this still work now that twitter has removed the RSS feeds?

    By Boydie on Dec 19, 2011

  25. I must admit, at first when I made my first yahoo pipes feed, I got overwhelmed and so complicated but once I got the feel of it, I got comfortable and I love using it now.

    By Kelly@ SEO Help on Jan 5, 2012

  26. I’m using a similar technique, but the output of Yahoo Pipes is sent to IFTTT, which pushes tweets into my BufferApp – that way I tweet on a regular, nicely-spaced out (in time) basis, as controlled by Buffer, rather than all at once as determined by when the original tweets occur.

    By Cooper Marcus on Jan 24, 2012

  27. This is awesome! Thank you very much!
    One question though:

    How do I make the “RT @USERNAME: ” appear at the BEGINNING of the tweet?

    By Liam on Feb 22, 2012

  28. Why are you so smart? Is there anything to be done for those of us who were neglected at birth? I can answer security questions, but want to make a hashtag. Many thanks for the new knowledges!

    By Jeffers on Mar 1, 2012

  29. Is there any other way without using TweeterFeed. I dont want sign up for one more account.

    By Pravin on Mar 6, 2012

  30. Hey Ann

    Yahoo pipes is very powerful tool.
    What is the best way to cordially thank someone for a mention without sending a direct message?
    I may give this method a go looks interesting.

    By Kasi Phillips on Mar 7, 2012

  31. Works like a charm! Easy to alter to my needs. Thanks :)

    By Jeremy on Mar 26, 2012

  32. Thank you, but i have this error messege at twitterfeed: “Your feed might be empty or missing publish dates or GUIDs. A feed needs to contain publish dates or GUIDs in order to work with twitterfeed, see help” :( some solutioN?

    By Rodrigo Córdoba on Apr 7, 2012

  33. The string builder no longer behaves as illustrated. The new version doesn’t add a URL – instead it adds both the userid@twitter.com and the (Twitter Name). I can’t figure out on my own how to convert that back to @username. Please update.

    By Dave on Apr 17, 2012

  34. @Rodrigo I have the same problem! Apparently the feed that Yahoo Pipes gives us doesn’t have publish dates. I’m stuck. Help, anyone?

    By Pabs on Jun 19, 2012

  35. Thanks for providing information on how to set up Twitter retweet bot. it is always good to set it in auto retweet mode so that the update happens without the need for manual tweets.

    By FeliciaCorrine on Jun 27, 2012

  36. I created a Twitter Bot Script to easy establish a Retweet Bot.

    http://twitbot.para-dice.de

    Much easier then with Yahoo Tubes :)

    Fell free to use!

    Greetings

    Manka

    By Manka on Jun 28, 2012

  37. Question, when the retweets go out, do they include the actual twitter account they are referencing or do they just say who it’s from.

    @demoaccount or
    demoaccount: (then the retweet)

    In other words, will the account you are retweeting know you are retweeting them?

    By dave on Jul 16, 2012

  38. @dave: The question is for me?
    If yes: Yes, the account will be notified, that someone has retweetet.

    By manka on Jul 16, 2012

  39. How can i put RT @USER at the end of post?

    By Rodrigo on Jul 17, 2012

  40. Using Yahoo pipes is an option, but to me it’s somewhat complicated and not that flexible. There are already working services like RoundTeam — http://roundteam.co . It provides a lot of auto-retweet options for free, and is very easy to use.

    By Oleg on Aug 5, 2012

  41. What’s the best way to prevent errors using Yahoo pipes?

    By Kasi Phillips on Aug 8, 2012

  42. Why do you need Yahoo pipes if there are already dedicated free online serices for automatic retweeting, like RoundTeam http://roundteam.co?

    By Oleg on Aug 8, 2012

  43. Yesterday, i used roundteam to retweet some hashtags and mentions. I got 125 retweets in 1 minute time. I got warned by twitter that my daily tweet limit has been exhausted and try after some hours. Is there any retweet control setting on roundteam? If not then it would be very difficult to escape Twitter’s ban or warnings.

    By Justin on Aug 23, 2012

  44. If possible, please tell a few words about your use case. Why do you need to retweet so popular topic (which generated hundreds of Tweets per minute)? Can regular search be used for this purpose?

    One thing, IMHO, is to retweet carefully. Of course, if I configure to retweet “Bieber” from all Twitter, my account will get blocked in seconds. But the other question is, do I really need to do that? Retweet services should not substitute/compete with regular Twitter search. RoundTeam, in particular, is positioned as Community Building Tool for Twitter, hereby encouraging to retweet “from followers” by specific hashtag/mention/keyword. Or to aggregate Tweets by specific topic from several accounts while using “retweet from following” or “retweet from lists” features. Typical example is news aggregating, but there are a lot more I can think of. Retweet “from all Twitter” is typically used by less-known companies for self-promotion purposes, they are obviously interested what Twitter is telling about them.

    The other thing is, sometimes community (followers) may generate huge amount of tweets of same topic (same hashtags) in seconds, so being retweeted by Team account, this account will get blocked.

    I agree, this is something they should think about. I suggest to write them an email to roundteam@roundteam.co — they have pretty good email support. At least my several requests were solved or responded in less than 24 hours.

    By Oleg on Aug 28, 2012

  45. The have changed the rss at twitter is there another to do this ??

    By Michell on Sep 4, 2012

  46. Thank you for sharing it. I’m trying to create a string like this.

    By Taswir Haider on Jan 21, 2013

  47. Thanks for sharing this. It’s really useful!

    By Jessica on Sep 4, 2013

  48. Is it possible to use this to retweet a person and not just a certain keyword?

    By Kyle on Jan 27, 2014

  49. @Kyle, yes it’s possible with RoundTeam, see here: https://roundteam.co/faq#faq17

    Cheers

    By Oleg on Jan 29, 2014

  50. Hi there,

    You can actually just use a retweet service like Twarma.com that allows you to send curated Tweets, Retweets and Favorites on autopilot.

    We’re currently in Private Beta so if any of you guys want to sign up visit the site!

    Thanks guys

    By Askin Akhan on Aug 10, 2014

  51. This is the great tip to gain quality twitter backlink and also useful to rank high my blog.

    By John Pascal on Oct 28, 2014

  52. I’m a big fan of the Yahoo Pipes tool. Thanks for sharing!

    By Dan on Sep 27, 2015

  53. Thank you for sharing it. Is there any other way without using TweeterFeed? Thanks..

    By Gereggi on Nov 10, 2015

Post a Comment