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.