Teach your Hubot to talk with Domainr

We often talk about new interesting web app ideas. One integral part of coming up with a name for a new projet is to find a suitable and free domain name. We use tools like Domainr to make the task a bit easier.

The talks often happen on Slack and we wanted to integrate Domainr right into the discussion to make it faster to check for domains. And having added a nice hubot named Bro (maybe Anna would be a better name?) with Slack, we decided to teach our Bro to talk with the Domainr API. The task was simple enough as creating Hubot scripts is quite straightforward.

As the script turned out to be useful for quickly checking possible free domains, we decided to pack the hubot script as a NodeJS module so others can also upgrade their bot easily! If you want to take a peek at the source or check it out otherwise you'll find the module on npmjs.

Upgrading your hubot is easy:
1. Add hubot-domainr to your hubots external-scripts.json -file
2. Run npm install hubot-domainr --save
3. Configure the DOMAINR_CLIENT_ID environmental variable

NOTE: For now the Domainr client ID can be anything, but in the future you'll have to register one. Read more at Domainr API docs.

After installation you can ask your hubot to check a word for related domains by saying: hubot domainr my_search_word. The results will look something like in the screenshot below.


PS. If you are trying to find out how to integrate Hubot with Slack you should probably start here.