Twilio sms workflow

I am trying to set up a workflow to automatically send out a reminder sms the day before a date.
Because I am in Denmark, I needed my own Twilio account, which I have set up, and tried to correctly connect to the AppSheet app with my SID and Token.
The workflow fails every time, and no sms is ever sent.

I have not bought a phone number with Twilio, since according to them, I can send from an alphanumerical sender ID for free (which is not only cheaper, but also better in my opinion).

I have also not done anything in Twilio to tell it that I want to integrate with Appsheet, since I thought that the auth was all done at Appsheets end.

Any ideas to why this isnโ€™t working?

Solved Solved
0 17 1,955
1 ACCEPTED SOLUTION

@Frederik
What you are misunderstanding or misevaluating is this:
The alphanumeric sender ID, is a friendly name given to any valid Twilio number. Twilio assigns or provides phone numbers to you as per your registering country. Not every registrar country are allowed to assign a friendly name to their twilio phone numbers. I have Twilio account too, however Iโ€™m not allowed to use a friendly name with my Twilio phone number. I believe you are totally mis-interpreting what you have read.

Besides; sending and receiving SMS messages from alphanumeric sender IDs totally relies on if the recipient numberโ€™s carrier allows it or not.

Provided you examine the first phyton (ruby) code that you have provided and the high-lighted code fragment; the assigned variable name is: twilio_phone_number where the alphanumeric sender ID โ€œPhilโ€ is assigned to valid Twilio phone number. When the code is executed, the Twilio API matches the sender ID with the Twilio number assigned and sends the SMS message. The second phyton code is for debugging/error trapping reasons only eliminating the error code and continue executing the code provided the recipient carrier does not accept SMS messages from alphanumeric sender IDs and send it thru subscriberโ€™s real Twilio number.

Provided you wish to send SMS messages with an alphanumeric sender ID which will appear as Frederik instead of +1-XXX-XXX-XX-XX:


1.) You can create a standalone Google Apps Script project with doPost(e)
2.) Construct the proper Google Apps Script code to make a HTTP POST call to Twilio API
3.) Deploy the project as a web-app executable
4.) Create a Webhook Workflow within AppSheet and use the aforementioned webappโ€™s URL as a webhook endpoint and construct a valid JSON body for your process


When the AppSheet workflow rule is triggered by your set criteria, it will call this webhook endpoint, execute the code enclosed within the doPost(e) event, call the Twilio API, process your code and send the SMS message.

If you had set your Twilio number to receive replies and provided you want to read/receive/log the SMS replies back to your app, thatโ€™s totally another scenario where you need to set a second webapp, but with a doGet(e) event this time and create a TwiML to call this webapp everytime a reply is received to its bin, run the code and record the message body and other required param values to your gSheet. Here is the one that I use with one of my apps to log SMS replies back to the AppSheet app.

Hope Iโ€™m clear now. If not, I may recommend reading the Twilio API documenation very clearly.

View solution in original post

17 REPLIES 17

@LeventK would know the answer, I bet.

Have you checked the Audit history details what that reason could be?

I have checked the log, but there dosent seem to be any relevant information on there, it just says โ€œErrorโ€.

Se this screenshot:

Click the red binoculars icon for details.

Ah, thanks!

I get this error:

โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Pรฅmindelse SMSโ€™ field โ€˜SMSFromโ€™ contains invalid phone number โ€˜FiberLANโ€™. Error: No SMS was created because โ€˜Fromโ€™ is missing or invalid.โ€

Does Appsheet not support the Twilio Alphanumerical sender ID?

Good questionโ€ฆ never have thought about that. Let me check this from our expert.

That would be great, thank you

Having your own Twilio account means you need to have your own Twilio phone number as well supporting alphanumeric sender ID support.

From what I can read at Twilios website, it just seems to me that you can (in some countries) send sms messages without needing to buy a phone number, by simply calling the API with a string of text instead of your Twilio phone number - have I misunderstood that, or is it just not supported by Appsheet?

EDIT:
They even have this suggestion for how you can work around making a universal API that reacts to weather or not the country supports alphanumeric sender ID:

@Frederik
What you are misunderstanding or misevaluating is this:
The alphanumeric sender ID, is a friendly name given to any valid Twilio number. Twilio assigns or provides phone numbers to you as per your registering country. Not every registrar country are allowed to assign a friendly name to their twilio phone numbers. I have Twilio account too, however Iโ€™m not allowed to use a friendly name with my Twilio phone number. I believe you are totally mis-interpreting what you have read.

Besides; sending and receiving SMS messages from alphanumeric sender IDs totally relies on if the recipient numberโ€™s carrier allows it or not.

Provided you examine the first phyton (ruby) code that you have provided and the high-lighted code fragment; the assigned variable name is: twilio_phone_number where the alphanumeric sender ID โ€œPhilโ€ is assigned to valid Twilio phone number. When the code is executed, the Twilio API matches the sender ID with the Twilio number assigned and sends the SMS message. The second phyton code is for debugging/error trapping reasons only eliminating the error code and continue executing the code provided the recipient carrier does not accept SMS messages from alphanumeric sender IDs and send it thru subscriberโ€™s real Twilio number.

Provided you wish to send SMS messages with an alphanumeric sender ID which will appear as Frederik instead of +1-XXX-XXX-XX-XX:


1.) You can create a standalone Google Apps Script project with doPost(e)
2.) Construct the proper Google Apps Script code to make a HTTP POST call to Twilio API
3.) Deploy the project as a web-app executable
4.) Create a Webhook Workflow within AppSheet and use the aforementioned webappโ€™s URL as a webhook endpoint and construct a valid JSON body for your process


When the AppSheet workflow rule is triggered by your set criteria, it will call this webhook endpoint, execute the code enclosed within the doPost(e) event, call the Twilio API, process your code and send the SMS message.

If you had set your Twilio number to receive replies and provided you want to read/receive/log the SMS replies back to your app, thatโ€™s totally another scenario where you need to set a second webapp, but with a doGet(e) event this time and create a TwiML to call this webapp everytime a reply is received to its bin, run the code and record the message body and other required param values to your gSheet. Here is the one that I use with one of my apps to log SMS replies back to the AppSheet app.

Hope Iโ€™m clear now. If not, I may recommend reading the Twilio API documenation very clearly.

Thank you very much for taking the time to explain it to me that thoroughly, it really helps

Youโ€™re welcome @Frederik, but please remember that you need to purchase a Twilio number to use any feature needed.

Hello @LeventK
Please can you help me with this, iโ€™m not familiar with Google Apps Script
Thank you

Please, could you help me on this ?

Hi @Levent_KULACOGLU ,

I managed to get something like this working, to a fashion, but, I cannot get the inbound SMS to trigger the BOTS. Did you have any luck with such function, so you can trigger push notifications when a new SMS is received.

And the expert is answered๐Ÿ˜‹

We do not currently support sending an SMS message via Twilio using an Alphanumeric Sender ID.
We would consider implementing this feature if enough customers would use it.

In the interim, you could probably achieve this by implementing a webhook.

Top Labels in this Space