Slack bot to index links in messages using Algolia

Howdy y’all, new member here.

You use Slack, yes? Slack has pretty good search, but it doesn’t (yet) index the contents of links included in messages (except the tiny snippets that appear in a link unfurl). Link Minder is a bot I built not too long ago that helps with this. The bot sits in a channel (you have to invite it) and watches for messages with URLs in them. When it finds one, it loads the page, indexes the contents, and makes it available for searching by messaging the bot directly.

You can install to try it out yourself (I’ve got it running on a free Algolia account, so I don’t know how well this is going to scale):
https://secure-fortress-69461.herokuapp.com/

or examine the source code directly:


(you can see I used to call it something else :wink: )

Would love feedback from y’all!

6 Likes

Thanks for sharing, Don :slight_smile:

I’ve seen it in action, and it’s working pretty well. Helps in finding this-link-you-remember-seeing-in-one-channel-but-can’t-remember-where.

Are you using the number of times a link is shared (or clicked) for custom ranking? This would put the more popular links (most shared) on top of the results.

2 Likes

That’s an interesting suggestion. The only custom ranking that I am doing is that I am indexing page titles and page bodies separately, and ranking titles ahead of bodies. Pretty trivial stuff.

1 Like

This is rad, thanks for posting @DEGoodmanWilson!

We have a channel on Algolia’s Slack called #misc-readings where we share links to articles we find interesting. That’s going to be perfect for trying this. I’ll report back once we get it hooked up.

1 Like

Do bear in mind that Slack bots have no access to channel history prior to the point that they were invited in, so you may need to re-post links for indexing. You can of course do this in a DM with the bot to avoid polluting the channel history.

2 Likes

This looks great. I’ve always wondered why links are so hard to find with Slack search. Thanks for sharing!