Use Twilio and Google Spreadsheets to build your own applications to do SMS polling / SMS voting, keyword marketing data collection, expense tracking, time tracking, and more.
No programming experience required.
(looking for a tl;dr? See below)
-
Name the spreadsheet "TwilioSheet" (or any name of your choosing)
-
Add "SmsSid", "To", "From", and "Body" to the first line in your new spreadsheet (other parameters are avaiable as well):
-
Click on the "Tools" menu, then click "Create a form":
-
A window will open.
-
If you see an option that reads "Require [Company Name] sign-in to view this form.", uncheck the box for that option.
-
Type "Testing" in the box that says "You can include any text or info that will help people fill this out."
-
Click "Save"
-
Click on the URL at the bottom of the window.
-
Another window will open. Copy the URL from the location bar of that window:
-
Open TwilioSheet in a new window.
-
Paste that URL you copied in step 9 into the box on TwilioSheet, then click the "Submit" button.
-
You should get a response from the site saying "It worked!"
-
Copy that URL.
Open another window, in that new window:
-
Log in to your Twilio account.
-
Go to the "Numbers" section of your Twilio account (or click here)
-
Click on the number you want to set up to send SMS data to your Google Spreadsheet.
-
Paste the URL you copied in step 13 (above) into the "SMS Request URL" box for the Twilio number you are configuring.
-
Make sure that the dropdown to the right of the "SMS Request URL" box is set to "POST".
-
Click the "Save Changes" button.
-
Send a text message that says "test" to the number you just set up.
In your Google Spreadsheet:
- Any text message you send to your Twilio number should show up in the Google Spreadsheet you set up after a delay of about 5-10 seconds.
- Start writing formulas to process the incomming text messages.
- Make a Google Form (http://support.google.com/docs/bin/answer.py?hl=en&answer=87809)
- Add items to your form where the "Question Title" is a parameter name for a TwiML SMS Request (http://www.twilio.com/docs/api/twiml/sms/twilio_request) For example: To, From, Body
- Publish your form.
- At the bottom of the "Edit form" window, look for the text "You can view the published form here".
- Copy the URL in the step above. Paste it into the box on TwilioSheet.
- TwilioSheet will make a new URL for you, use that URL as the "SMS Request URL" for one of your Twilio numbers.
Notes:
You can run this code yourself if you like. Here are tips on how to do that:
To deploy to Heroku, you'll need to set up virtualenv, like so:
$ virtualenv venv --distribute
$ source venv/bin/activate
$ pip install -r requirements
After setting up virtualenv, this is how you deploy to Heroku
$ heroku create
$ git push heroku master