Syndicating Link Posts From a Static Blog to Twitter Without...Well, Let Me Explain

A few weeks ago I started syndicating all of the posts from the candler blog to a new Twitter account, @thecandlerblog. Since I’m off Wordpress and thus can’t use a fancy-pants plugin to achieve this, I decided to use an If This Then That (IFTTT) recipe to take my site’s RSS feed and send out a tweet on the new account. Easy!

Not so fast. I ran into a bit of a problem that I figured was edge case-y enough that I didn’t need to bother you all with the nerdy details of how I fixed it. But Doug Stephen just posted his own hack to solve the exact same issue, so I figure it’s time for me to share the sauce (really, it’s very boring sauce) on how I got it up and running.

The Problem

There are two kinds of posts on the candler blog: Normal, long-ish blog posts like the one you’re reading right now, and link posts,1 which are shorter and feature a headline that links out to a different site. I love writing link posts, and I encourage readers to go check out the sites I’m linking to. I’m only too happy to have readers subscribe to my RSS feed and experience the site through a feed reader.

However, this setup doesn’t quite work on Twitter. All I want posted to the site’s official feed is the post title and the URL back to the candler blog. Why? Because I believe the full experience of what I’m trying to do here comes from the headline I choose, the sites I link to and the commentary I write.

The IFTTT RSS to Twitter recipe can only syndicate the post’s title and the URL it points to. In the case of link posts, all you will see is a headline and a link to some other site. That would be all well and good except it basically diminishes the whole experience of reading the candler blog. There will be no context for the link. Or the headline. So that wouldn’t do.

The Fix

Enter Yahoo! Pipes. If you’ve never played with Pipes before, I highly recommend taking it for a spin. I barely know the full potential of the tool, but I do know this: it allows you to take any RSS feed, even multiple feeds, and rewire them to your liking. Want to mash some feeds together? What to get a new feed featuring only the work of a single author? How about only tagged with things you are interested in? It’ll do all of that and more. And it allows me to reconfigure my site’s feed to change the destination of link post URLs back to the candler blog. Here’s a quick look at what my pipe looks like:

My Link Fixing Pipe

The first little window you see is simply there to fetch my site’s RSS feed. All that needs doing there is to plug in the Feedburner URL of my feed. Easy.

The next window is where all of the magic happens. The Create RSS module (under “Operators” in pipes) allows you to do the rerouting of feed level items. In short, it gives you a blank slate of an RSS feed, and then allows you to plug in whatever data from your feed you want. In my case, every part of the feed should remain the same except for the Link section. Items like title and description are all available from a drop down in the RSS creator module. All I needed to find was which operator to plug into the link level to tell pipes to use each post’s permalink as its title link.

Following?

Along the bottom of the pipes interface is a handy little tool that displays whatever your feed looks like on the selected module. To find the permalink in the feed, I selected the Fetch Feed module (the one at the top) and started digging through the feed output? Here’s what it looks like:

Pipe Output Display

The permalink pointing to my site is, luckily, easy enough to find under guid > content. Simply type item.guid.content into the Create RSS line for Link and connect it to the pipe output. Now, instead of the external link, the RSS headline will be point to the original candler blog post.

Save the pipe, then from the “My Pipes” page, grab the new RSS feed. Go back to IFTTT and create a recipe using the pipe RSS feed. Boom. A convoluted workaround to account for link posts.

Almost Done

All this automation is well and good, but sometimes I like to push it along. For that, I have a few handy bookmarks in a folder that I click after posting.

First off is pinging my feed. Feedburner is supposed to ping your site every 30 minutes, but, you know, Feedburner sucks. Luckily, they have a manual pinging page where you can enter your feed and ping away. The URL of the page that returns when you do this is actually all you need to set off a manual ping, so after you do it manually, just drag the page to your bookmarks bar and save it. The URL should look like this:

http://feedburner.google.com/fb/a/pingSubmit?bloglink=http%3A%2F%2Ffeeds.feedburner.com%2F[your-feed-name-here]
// Sans brackets, of course. //

Next, I like to check on my pipe and make sure it refreshed. To do that, I simply saved the direct URL to my pipe as a bookmark. After I ping Feedburner, I go and check that the pipe received the update. If it hasn’t, no worries, it picks it up quickly enough.

Finally, I keep a bookmark handy that points directly to the IFTTT page for the Twitter posting recipe. I tried saving IFTTT’s built in force-run URL scheme, but I have been unable to actuate it from the Bookmarks Bar. Visiting it simply takes me back to my recipe page. If I really want a tweet to go out right away, I go to the IFTTT page for the recipe and click “Check Now.” I’ve stopped doing this unless I plan to post more than one post in the space of 15 minutes, IFTTT’s automated (and quite reliable) refresh time.

Go Forth and Post

If I had to guess, I’d say it took me about 15 times as long to write this blog post as it did to set up this Pipe and IFTTT recipe. Both tools work incredibly well together. Pipes is powerful for taking any number of RSS feeds and turning them into the content that you want, and IFTTT allows you to do all kinds of wacky stuff with an RSS feed. And now that I’ve set it up I rarely think about it, so I’m glad I did.

This system works well for me on Octopress, but I assume that it works similarly for any static blogging system. Your mileage may vary, but I’d love to hear what blogging engines this works on and which ones it breaks. And if you have ideas on how to finesse this, please do share.


  1. Or Linked List posts or Linklogs or Linkblogs, pick your poison. ↩︎