August 2008

Making SMS Work For You -- Building SMS Actions for Drupal

At the MIT Mobile Experience Lab, we are doing a lot of interesting projects to connect people more with the places they visit, the people they know (or don't know), and information, with an emphasis on helping people while they are mobile. Since an increasing number of mobile people carry mobiles, a lot of my work has been working on ways to create connection by using a cellphone.

Lately in particular I have been working with SMS. The SMS Framework for Drupal is pretty awesome, but we needed better two-way communication. We aren't trying to just let people post to a Drupal site via SMS, we needed to be able to send commands to Drupal via SMS to trigger activity in the site and receive feedback.

I drew a lot of the design for my SMS actions from my experience working with the Services module and it functions in a very similar way. Contrib modules register their own actions (keywords which are triggered off the first word of an incoming SMS) and specify callback methods for those actions. The callbacks then process the text and can fire back responses to the user or simply just perform some action in the system.