2-Hour Hackathon and now you can send SMS from Hubot

6

Yesterday (yeah, a Sunday!) we did a small “get together” with the dev team, it wasn’t really planned but it was fun! So what do the dev people do on a Sunday? That’s right, a hackathon!

As you might have noticed, we love the SMS technology because of its multiple use cases. And we are also proud of the simplicity of our SDKs and our REST API 🙂

So we decided to do a small two-hour hackathon, and see what we could come up with. In that time we had to think of a few ideas, choose one of them, and implement it as complete as possible.

We are also huge fans of Hubot (a GitHub bot that you can tweak and extend in a unimaginable number of ways) and we also use HipChat for our daily work, so we can communicate between us devs and the rest of the PortaText teams.

It was clear for us at that point what we had to do: enable Hubot to send SMS (and in our case, that meant to send SMS right from a HipChat room). We made the resulting code available on our GitHub account so everybody can benefit from it.

How it works

It’s really easy! We have made available 2 commands, one to add a telephone number to a contact, like:

sms_contact add john 12223334444

And another one that will send an SMS to that contact like this:

sms john Hey dude, make sure you bring enough coffe — script!

Now we can communicate with the team members via SMS by just telling PortaBot (that’s the name of our Hubot) to send an SMS. Notifications, alerts, good or bad news, how cool is that?

The code

As you might have noticed, the code is only a few lines of CoffeeScript, and we can even send the SMS with just 1 line 🙂 We intend to continue growing and using more of the PortaText features through this script, feel free to open new pull requests and issues with your feedback!

— The PortaText Team.