title: How to Use Google Script with Google Spreadsheet to send SMS (Text) Messages
body: <p><a href="http://productforums.google.com/forum/#!forum/apps-script" rel="nofollow noreferrer">This Google Script page</a> says that stackoverflow is the place to post Google Script questions, so here I am.</p>
  
  <p>I want to use a Google Script to automatically send text messages (SMS) to all cell phone numbers in a Google Spreadsheet.</p>
  
  <p>It is possible to send e-mails to all e-mail addresses in a spreadsheet by following <a href="https://developers.google.com/apps-script/articles/sending_emails" rel="nofollow noreferrer">this tutorial</a> but when I try using phone numbers in a spreadsheet in place of e-mail addresses I get an error that those are not valid e-mail addresses.  Fair enough.  If I knew the cell phone companies tied to each of those cell phone numbers I could convert those phone numbers into e-mail addresses (a common option with several guides explaining it, <a href="http://www.speedofcreativity.org/2011/08/27/use-a-google-docs-spreadsheet-to-send-text-message-alerts-to-students-gct/" rel="nofollow noreferrer">like this one</a>) but I don't have that cell phone provider information.</p>
  
  <p>I am certainly not the first person to try to automatically send text messages from a computer rather than a cell phone.  <a href="https://stackoverflow.com/questions/4269/programmatic-sms">This question</a> is one of the more popular (but also older) questions asking about it.  <a href="http://www.twilio.com/sms/pricing" rel="nofollow noreferrer">Twilio</a> pops up in several answers I've looked through but that is not a free service (although it is pretty inexpensive, I will admit.)  Google has free options, though, so I figured I'd try those.  <a href="http://www.google.com/mobile/sms/voice/" rel="nofollow noreferrer">Google Voice can send free text messages</a> and you can even send free text messages <a href="http://www.google.com/mobile/sms/mail/" rel="nofollow noreferrer">through Gmail</a>.</p>
  
  <p>I know that many have <a href="https://stackoverflow.com/questions/1668619/is-there-a-google-voice-api">searched for an API to use Google services to send text messages</a> and there doesn't seem to be one.  There are some interesting projects like <a href="http://code.google.com/p/google-voice-java/" rel="nofollow noreferrer">google-voice-java</a> but these are more work arounds than anything.</p>
  
  <p>Thus I figured I'd just use one Google service (a Google Docs spreadsheet) to call another (Google Voice or GMail) through the use of a 3rd (Google Script).  Is there some way to do this?  Is there a way to get a Google Script to send text messages?  For example, the <code>MailApp.sendEmail</code> sends e-mails - is there one to send text messages (SMS)?  If not, can <code>MailApp.sendEmail</code> be massaged/jury rigged to send texts (without needing to turn the phone number into an e-mail address like [phonenumber]@txt.att.net)?  Could some other scripting option be used, perhaps related to Google Chat (since the GMail texting option is related to Google Chat)?</p>