Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Accepts HTTP POSTs from Twilio and forwards to http://grove.io

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 app.rb
Octocat-spinner-32 config.ru
README.md
               __                              ___    __      
              /\ \__                          /\_ \  /\ \__   
  ___     __  \ \ ,_\    __     _____   __  __\//\ \ \ \ ,_\  
 /'___\ /'__`\ \ \ \/  /'__`\  /\ '__`\/\ \/\ \ \ \ \ \ \ \/  
/\ \__//\ \L\.\_\ \ \_/\ \L\.\_\ \ \L\ \ \ \_\ \ \_\ \_\ \ \_ 
\ \____\ \__/.\_\\ \__\ \__/.\_\\ \ ,__/\ \____/ /\____\\ \__\
 \/____/\/__/\/_/ \/__/\/__/\/_/ \ \ \/  \/___/  \/____/ \/__/
                                  \ \_\                       
                                   \/_/

endorse me on CoderWall

This is a simple app to accept an HTTP POST coming from a Twilio received SMS and forward it to a Grove.io chat room.

Why do you need this?

Glad you asked! Grove now supports sending "notifications" to your channel via HTTP POST. So after I wrote the Hubot script that lets you send SMS messages from Hubot (and thereby, Grove) I wanted a way to get any replies to come back into the room. This is that solution.

Basically when someone texts your Twilio number, they do an HTTP POST to Catapult. Catapult then takes that POST and makes another POST to your grove room using their API. Catapult probably wouldn't be needed if Grove could identify POSTs coming from Twilio and line up Twilio's 'Body' header with the Grove 'message' header and supply a default of 'Twilio' for the Grove 'service' header.

Feel free to tweak this.

It's powered by Sinatra.

Setup

  • Clone this repo - git clone git://github.com/caleywoods/catapult.git
  • cd catapult
  • heroku create appname
  • heroku config:add grove_api_key=sooper_secret_key
  • git push heroku master

This should deploy your version of catapult out to Heroku. Then you need to login to Twilio and setup your SMS number to HTTP POST to http://yourapp.heroku.com/incoming

Once this is complete you should be able to SMS the Twilio Number and see your replies in the Grove channel.

Example

Something went wrong with that request. Please try again.