The Messaging Bot
Tags: twilio, beginners, programming, coding
Published: 2018-04-03 20:39:00

---
title: The Messaging Bot
published: true
tags: twilio,beginners,programming,coding
canonical_url: https://blog.yechiel.me/using-twilio-to-add-sms-notifications-27e7e4834623
cover_image: https://cdn-images-1.medium.com/proxy/1*p-7Kt3Jt-YwLH7dPTjtTbA.png
---

### Using Twilio To Add SMS Notifications To My Twitter Bot


As you may recall, I [recently](https://dev.to/yechielk/creating-my-first-twitter-bot-1kj4) built a Twitter Bot that retweets whenever Alternate Side Parking rules are suspended in New York City (you can follow it [here](https://twitter.com/AlterSideBot)).

The bot was a great hit; gaining over 150 followers as of the writing of this post, but it had its limitations.

For one, some people aren’t glued to their Twitter feeds; one retweet can easily get lost in the noise of an active feed. Then there are people who don’t have Twitter (the number one complaint when I told my family about the bot).

#### Enter Twilio

[Twilio](https://www.twilio.com/) is an API that can be used to, among other things, connect your app with a phone number that can make/receive phone calls and text messages.

I heard lots of great things about how easy it was to use, and how cool it was to make stuff with it, so I figured this would be a good project to try it out.

The hype was justified. The API is extremely user-friendly, the documentation is very clear, they even have a game to help you get started (try it: [TwilioQuest](https://www.twilio.com/)).

I wrote a blog post about the technical part of adding the SMS and voice functionality to my app (you can read it on Twilio's blog [here](https://www.twilio.com/blog/2018/04/sms-notifications-ruby-on-rails.html)). This post will focus on the user aspects of the app.
![](https://media.giphy.com/media/4BiuGGfBIDWXC/giphy.gif)

#### How Does It Work?

The app is very simple.

Save the following number to your phone-book: 347–404–5618

Now you can interact with my app using the following commands:

**SUBSCRIBE** : subscribes you to receive SMS notifications whenever Alternate Side Parking rules are suspended.

**UNSUBSCRIBE** : if you want to stop getting notifications (don’t worry, I won’t get offended).

**STATUS** : if you just want to find out the latest status of the rules (whether they are suspended or not) without subscribing

Additionally, you can also call the same number (347–404–5618) at any time to hear the latest status.

#### Spare Some Change?

If I thought my Twitter Bot was a success, my SMS app caught me completely unprepared. Within a day I had over 60 followers, and within a week I was at 100 (140 as of the time I wrote this post).

{% tweet 973563306614185984 %}

The problem with that was that, unlike my Twitter bot, this app had the potential of costing me money. Not a lot (sending notifications to 150 subscribers for one snowstorm costs $2.10), but it has the potential to add up.

I don’t plan on monetizing this (no one wants to get advertisements to their phones), but if you do enjoy the SMS notifications, please consider sending a dollar or two or five to my [PayPal account](https://www.paypal.me/yechielk). If you make a contribution of more than $5 (just a bit more than 2 snowstorms or legal holidays) you will even get a special, limited edition Rabbi On Rails sticker as a token of my appreciation, just remember to include your mailing address with the PayPal payment.

You can also feel free to follow my Twitter bot [@AlterSideBot](https://twitter.com/AlterSideBot) or me [@yechielk](https://twitter.com/yechielk)

* * *
*This article has been cross-posted from my blog [Rabbi On Rails](https://blog.yechiel.me/using-twilio-to-add-sms-notifications-27e7e4834623).
You can read more about my coding journey there, or by following me on Twitter [@yechielk](https://twitter.com/yechielk)*