Confession… I am not normal

I will freely admit that I am absolutely not normal. I have had a long standing obsession with acquiring phone numbers to automate things. For a short duration, my parents allowed me to set up an automated attendant at our house – you know, press 1 for Charlie or Tracy, press 2 for Matt. That didn’t last too long. I also love automated SMS systems. I’ve tried quite a number of third party tools for text voting and other such tasks. I know that it’s a strange obsession, but as we’ve established – I’m not quite normal. Moving on…

Meet Twilio

Twilio is my new favorite tool. They let a “shadetree developer,” like myself, build awesome communication tools. I’m currently using Twilio for delivery of SMS messages and phone calls. For only a dollar a month, you can grab a “local” phone number, a 10-digit phone number in any area code you like. Then for fractions of a penny, you can begin sending and receiving SMS, MMS, and telephone calls, all from a simple and easy-to-use REST API.

Girl sending a text messageText Voting

The first tool that I built using Twilio was a text voting tool. I started with the example code provided by Twilio. For a number of reasons, I prefer MySQL to SQLite, and I modified the script to allow saving to a MySQL database. Currently, we’re finalizing a number of changes to the system that will allow multiple Twilio numbers to have concurrent events taking place, all receiving votes to their own candidates. During Homecoming, we have several groups request this functionality for different events. We’re completing the system now that will allow each event manager to have a log-in to manage their own candidates and results. We’ll opensource that and provide it for download upon completion.

Previously, groups paid an average of about $140 for a single text voting campaign. We were able to offer this ability to our groups for around $25. We found no drawback to using a 10-digit phone number instead of a shortcode, which is the only real “feature” offered by third parties that was out of our price range. However, it greatly simplifies the entry.  Instead of texting a shortcode with an event keyword, a space, and then the candidate number, you can instead have them simply enter the candidate number in a text to a 10-digit number.

Mass Texting

Many of our campus departments have requested the ability to send mass SMS messages to students. This need has arisen because many of our students rarely or never check their official university email account.  As we speak to other universities, this is a problem that seems pretty universal.

Centralizing SMS

From an administrative standpoint, we really want to centralize these messages as much as possible. We do not want to overuse SMS, as it would only be a matter of time before that becomes ineffective and annoying to students. Also, we want to make sure that departments honor a student’s request not to receive text messages from the university.

When a department requests the ability to send mass text messages, we forward the request to the COO for approval. Upon approval, we then make the following requests of the department:

  • Limit mass texts to a handful a semester. We haven’t set a hard-and-fast limit on this, but we want texting to be used only in very important situations.
  • Make the mass text message sound personal. Use your name. Don’t let it sound like an automated notification.
  • Be prepared to answer questions from students quickly, even if after hours.
  • Don’t let this be a replacement to conversation with students. Phone is still better. This should enhance, not replace.
  • We need to honor the students request to not receive SMS messages. Believe it or not, not everyone has unlimited texting.

How does it work?

The tool we have created for various campus departments is very simple. There is a field for the telephone numbers and a field for the message. Our users are able to obtain an Excel spreadsheet with the numbers of students who have opted-in to SMS messages and meet their search criteria. Our mass texting tool allows them to copy the column of phone numbers and paste it into the form. Then, they enter a message with a maximum of 160 characters and press the send button.

Students will receive this message from the department’s 10-digit Twilio number. Since we’ve asked departments to identify the name of the sender, many student’s will enter this number into their contacts, in case they have future questions or needs. When the student replies, it is routed through a simple handler on our Web server. This turns the body of their text into an email to the department.

Before I send the email message to the department, I fire off an ODBC request to our student information system. I pass in the “from phone number,” and I look up basic demographic information: first and last name, student ID, email address, current status, etc. I add this in the email as well, so that the department will know who sent the message. Some of our departments have asked for a couple of other pieces of information to be added to their emails to aid in their response to students.

The email includes a link to reply back to the student. When they click on this link, it brings up a familiar look. This time, the name area is populated with the information we found in the SIS. An open text area awaits their 160-character or less reply, and below that, I show the full message history between the student and the department’s Twilio number. This is accomplished by polling the Twilio REST API to request that information.

If you’d like to take a look at this code, let me know in the comments. I will be happy to provide some of it as reference for your project.


I love Twilio, partly because I have a weird obsession with automated communications, and partly because they really enable some awesome tools. At a buck a month for a phone number and less than a penny for each message sent or received, it most certainly won’t break the bank.

Twilio isn’t the only game in town. Plivo is another competitor in this market. I just can’t vouch for them because I haven’t used them. I don’t receive any financial kickbacks from either, so please accept these experiences as those of an unbiased user.

Photo credits: Young man texting in apartment by andronicusmax (cc); Woman sending a text message by (cc)