With the demise of SMS messaging for non US phone numbers, many of us have been cut off.
There are some existing options out there for pushover and WhatsApp, but I prefer good old fashioned SMS.
Here is what you need to do to use Twilio SMS with webCoRE, I’m sure someone will figure out how to make the web calls to Twilio directly, but for now I’m passing the requests through Google Sheets / Script API.
Seems a bit long winded but that’s because I’ve carefully spelt out every single little step, most of it is just copy paste.
Step A - Register for a Free Trial Twilio account
- I wont go through the initial steps for this as Twilio walks you through the process, however please use my referral link by clicking here and we both get $10 credit
- When you are asked to verify your mobile number, choose the initial number you wish to send messages to. Until you upgrade to a paid account you can only send messages to verified numbers.
- Choose an available phone number of your choice, making sure it has the SMS capability.
- Take a copy of the of the ‘Account SSID’ and ‘Auth Token’ from the Twilio Dashboard.
Step B - Setup the Google Sheet
Create a Google Account if you don’t already have one
Click here to open the template (read only) spreadsheet shared on my Google Drive.
Click File > Make a Copy, and save a copy of the template in your own Google drive.
Within your copy of the template:
- Enter your Twilio ‘Account SSID’
- Enter your Twilio ‘Auth Token’
Click the red button to generate a strong random code to secure communications between webCoRE and the Google API. Note that the first time you do this an authorisation page will pop up:
- Click ‘Continue’
- Select your google account
- Click ‘advanced’
- Click ‘Go to Send SMS (unsafe)’ - don’t worry, Goggle says this about all custom apps)
- Click ‘allow’
Set the ‘To’ field - During the free Twilio trial this can only be the phone number you verified in step A2 above. Paid accounts can send to any number worldwide.
Set the ‘From’ field - During the free Twilio trial this can only be the phone number you chose in step A3 above. Paid accounts can appear as coming from any alphanumeric ID (i.e. ‘webCoRE’)
Note that because of the way Google Sheets handle strings starting with the + symbol, you must place an apostrophe at the start, i.e. '+447XXXXXXXXX**
Click the blue button to trigger a test message. (this may require a re-authorisation the first time, not sure)
Publish the Google Script for webCoRE control:
- Click Tools > Script Editor
- Click Publish > Deploy as Web App
- Leave ‘Anyone, even anonymous’ selected (the strong code above is your safety net)
- Click ‘Update’
- Copy the ‘Current web app URL’ to a notepad for use in webCoRE shortly
Step C - Install the Master Piston in webCoRE
Install the following master piston using the import code provided:
Change the variable ‘GoogleAPIURL’ to the web app URL copied in the step above.
Change the variable ‘smsCode’ to the strong code selected in step B4 above
if you are still on the free trial, change the ‘smsFrom’ variable to the phone number you chose in step A3 above. Paid accounts can appear as coming from any alphanumeric ID (i.e. ‘webCoRE’)
Save the piston
Step D - Install the Test Piston in webCoRE
Install the following test piston using the import code provided:
Change the variable ‘smsToNumber’ to the phone number you verified in step A2. Paid accounts can send to any number worldwide.
You will need to rebuild the ‘execute piston’ action, linking to the master piston installed in step C above, instead of my version of the same. Make sure you select both variables to send with the execute command.
The test piston provided is just an example of how to trigger an SMS from any piston you like, just execute the master piston with those two variables selected.
When you are happy things work for you, upgrade to a paid Twilio account to enable custom sender ID’s, sending to any number and to remove the watermark from the text messages. Cost vary country to country, but in the UK it 4p per message segment, more when sending emoji.