How to set webhook body to google script dopost for alphanumeric sms

167
Bronze 3
Bronze 3

Hi,

I am trying to send alphanumeric SMS but since APPSHEET does not support at this point, I have follow this solution Twilio sms workflow - #13 by LeventK with the help of using webhook and google script.

I have manage to use webhook to trigger google script to send http request to twilio send sms.
I need help on how to construct the json body of the webhook and match with google script side.

Google script side :

var payload = {
โ€œToโ€: โ€œ+xxxxxxxxxxxxโ€,
โ€œBodyโ€ : โ€œtesting messageโ€,
โ€œFromโ€ : โ€œcompanyโ€
};

I only manage to trigger to send the content that is in the google script but how do I construct the json body of the webhook in appsheet to replace the content.

I trying to send sms reminder to customer
<<[customer contact]>>
<<[customer name]>>
<<[location]>>
<<[timeslot]>>
<<[status]>>

Sample:
Hi <<[customer name]>>,
Your appointment at <<[location]>>, <<[timeslot]>> is <<[status]>>.
Thank you.

I am new to coding, please guide me

0 8 372
8 REPLIES 8

Aurelien
Google Developer Expert
Google Developer Expert

Hi @167

Why do you say:

As there is this in the Task part ?


3X_8_5_850fbc23a9d76cca66e4bdaf7f6de86c0a9f5c43.png

The point is ALPHANUMERIC sender SMS

The task only can send SMS showing Twilio number as sender

Aurelien
Google Developer Expert
Google Developer Expert

Iโ€™m pretty sure you can specify a friendly name on the Twilio side, as far as I remember.

I made a few researches, here is what I found:

Please be aware all countries do not suppport this feature, as you can see in the section โ€œWhich Countries Support Alphanumeric Sender IDs?โ€ from the last URL.
Also, section: " How to get an Alphanumeric Sender ID"

Can you tell us if that helps you ?

Twilio did support Aphanumeric sender ID but Appsheet current do not support the request to twilio.

The โ€œfromโ€ in the sms task that you mention, only can put Twilio number and not Alphanumeric.
Therefore, base on Twilio sms workflow - #13 by LeventK, we can use appsheet webhook to send request to standalone google script dopost(e) http request to twilio to achieve the alphanumeric sender result.

So the issue here is, I manage to active the trigger but not sure how and where to control the content.

Aurelien
Google Developer Expert
Google Developer Expert

Ok, thank you for further clarification. Then, Iโ€™m afraid I canโ€™t help you.
@LeventK , @Steve ?

I have no experience with Twilio.

Thanks @Steve for the info

But the key here is ALPHANUMERIC SENDER, i will need to be able to send SMS with company name for the sender instead of showing twilio number.

My country did support alphanumeric sender, so the issue now is how do i amend the SMS content for between the APPSHEET webhook and Google script for the Http request to twilio.

167
Bronze 3
Bronze 3

This is currently my setup which I know is wrong but just not sure how to change it.

I can only manage to send a trigger from Appsheet to Google App Script to send the โ€œdata in Google App Script itselfโ€ to Twilio to send the sms

Not sure how the template should be and what code needed for it.
I know there is this article (How to Integrate Google Apps Script & Trigger with an AppSheet App) to explain but to someone who does not know much about coding, its harder for me to understand.

Hope someone can guide me along

Top Labels in this Space