Slack

Using Siftlinks and IFTTT to Aggregate Links From Your Twitter Timeline Into a Slack Channel

Ever wonder if there was an easy way to get the links people post to a Twitter timeline fed into a Slack channel? Wonder no more!

For this Rube Goldberg machine to work, you’ll need 3 components:

  • A Twitter account.
  • A Siftlinks account tied to your Twitter account. Siftlinks is a paid service that makes an RSS feed out of the links posted to your timeline (as well as an RSS feed of links from your Twitter favorites) and offers a 30-day free trial. After that it’s $10 a year. That’s 83.3 cents a month. Cheap cheap!
  • An IFTTT account.
  • A Slack team and a channel to post links to.

After following the instructions below, you get something looking like this screenshot my #links channel from a few minutes ago:

Screenshot of my #links channel in Slack.

Instructions

  1. Login to Siftlinks with your Twitter account.
  2. If you haven’t already, activate the Slack channel in IFTTT.
  3. Create a channel in Slack just for links incoming from Twitter. It might make sense to use an existing channel, but the large amount of links in my timeline doesn’t justify it, so I post to a separate #links channel that I dip my toes in every couple of hours.
  4. Create a new recipe in IFTTT.
  5. Select Feed as the trigger channel.
  6. Select “New feed item” as the trigger.
  7. Title the recipe “Filtered Siftlinks to Slack”
  8. Siftlinks provides the RSS feed for you to paste in at this point. It’s the URL in “Here’s the latest links in your Twitter feed. You access them via RSS by adding [your secret URL here to your RSS Reader.” message at the top of the screen in Siftlinks.
  9. For the Action, select the channel you want to post in.
  10. As the Message, use just {{EntryUrl}}.
  11. Leave the Title, Title URL, and Thumbnail URL fields blank. Slack will gather the title and some information about the link on its own.

At some point, Siftlinks promised to add a feature to filter out image links (pic.twitter.com, Instagram, etc.) and other URLs like Foursquare/Swarm and Untappd checkins. I couldn’t wait, so I use Yahoo! Pipes to filter out URLs that start with certain domains and used the RSS feed it produces in place of step #8. (That list is up to 16 domains, by the way.)

What this won’t show is who posted the link. That means you can evaluate whether you should click through based on its content, not who shared it.

Why not use Slack’s built-in RSS integration? That integration pulls in the metadata (like title and description) from the RSS feed itself. The metadata-gathering Slack does itself when presented with just a URL is much prettier.

I pull in a few other RSS feeds this way—i.e. using IFTTT—and have them post URLs to Slack channels, like a Talkwalker alerts feed for news about the game Ingress and an RSS feed I made out of Belong.io using XPath (I wasn’t the only one who did that). Slack is my second-favourite RSS aggregator these days1, a fun way to see what links get posted to my Twitter timeline without having to visit Twitter at all.

Previously:


Also published on Medium on May 14th, 2015.


  1. Reeder for both the Mac and iOS is my #1 fave at the moment. ↩︎

Bare-Bones Sports Alerts in Slack

You might remember from such blog posts as the one on March 24th of this year that I built a Twitter client using Slack as the platform. On the train to HUMAN’s studio-warming, I saw a blog post from Slack about how to add Twitter integration to a team and channel. At first when I read it, I was dismayed that they had implemented what I wrote with Slack-Twitter (i.e. the ability to get your entire Twitter timeline in a Slack channel and post to Twitter from that same Slack channel).

On closer inspection, though, it wasn’t that at all, but rather a nuanced approach to ‘following’ a single Twitter account inside a Slack channel. Instead of my approach, they pitch it as a way to get alerts from one or a just a few accounts, like, for example, a transit agency’s tweets in a Slack channel.

In the course of trying to figure out what they meant by that, I added an official Twitter integration to my test Slack team, and used the @MLBHR Twitter account to notify that channel of every home run. (If you want notifications of just home runs by Toronto Blue Jays slugger Edwin Encarnación, you can do that with the Eddie’s Right Arm account, which RTs just the dingers socked by Eddie.)

To get home run alerts in a Slack channel:

  1. Follow the instructions at Slack for setting up a Twitter integration.1
  2. Make the settings look like the following screenshot.
    • Uncheck "Post tweets sent TO this account"
    • Check "Post tweets sent FROM this account"
    • The other settings in "Auto-Post Tweets in Slack" don’t matter so much, but might if you use a different Twitter account.
    • You’re on your own for finding a good icon to use.

Screenshot of a Slack channel configured to get home run alerts in a channel

That’s it! Now you have dingers in your channel. You can expect it to look something like the following:

Screenshot of a Slack channel showing home run alerts

You get all the benefits of Slack (search, highlight words, etc.) without actually having to follow the account on Twitter.

I’d love to know if there’s a Twitter account for every NHL goal and…I’m not sure what to get alerted about for basketball games. (What happens often enough to happen once or twice a game, but not more than a half-dozen times? And is there a Twitter account for that?) Until publications like ESPN add their own integrations, this is a fun, bare-bones way to get alerts like position players pitching and touchdown notices and the like in your Slack channel.


Also published on Medium on April 16th, 2015.


  1. If you have Slack-Twitter up and running, you’ve done this part, but have to add another instance of the integration. Hold on, you have Slack-Twitter up and running? Tell me how it’s going! ↩︎

Introducing Slack-Twitter

Have you heard of Slack? If you work in the tech industry, or have friends who work in the tech industry, there’s a pretty good chance you’ve heard of it, (though I do still encounter tech-savvy people who haven’t heard of it). The explanations of what it is vary depending on whom you talk to. It’s often described as group chat with link previews or an email-killer. It’s really whatever it is you want it to be since it can integrate with just about anything.

“An API for knowledge” is a pretty good, if maybe abstract, descriptor of what it is. Matt Haughey, in a podcast announcing his retirement from MetaFilter and his new job at Slack, described his employer’s product as a toy that people use at work. I liked that description so much that I left the Slack teams that didn’t have a well-defined purpose (such as work) or topic (such as the Ingress faction I belong to).

Since I’m now spending quite a lot of time using Slack, I wanted a way to read tweets in Slack. The official Twitter integration for Slack “only” pulls in mentions and expands tweet URLs so that it shows the entire text (and photo if there is one) of the tweet. That’s pretty darn cool, but there’s no functionality within the official integration to have your own timeline, i.e. the tweets of people you follow, show up in Slack nor is it possible to post tweets from Slack. Using Twitter’s Streaming API and Slack’s Real Time Messaging API, I built the middle piece that do those two things. I can post tweets from Slack and read tweets from my timeline. Cool, right?

You have to know a little bit about Twitter and Slack tokens to get this hooked up. You don’t have to host the program yourself: once you’ve gotten the tokens sorted out, you can quickly deploy it to Heroku. I recommend, nay, urge you to hook this up to a separate channel for the single purpose of reading and posting tweets. Posting any message under 140 characters will be published on your Twitter account.

I’ve only tried this with my personal Slack “team” and not a real world example. I can see how this might be interesting for a group to join the channel and read the tweets that the organization account follows, as well as ‘collaboratively’ post. I can’t wait to see what bugs that might cause, in a very public way.

It crashes every now and then, thanks to a memory leak somewhere along the line. There’s another heisenbug that periodically tweets a URL of a tweet from your timeline but I don’t know the pattern yet. Still interested? Take a look at the instructions and deploy to Heroku. It’s free!

Deploy


Also published on Medium on March 24th, 2015.