Message Boards Message Boards


Use Twilio ServiceConnect to send messages via a Cloud FormFunction?

Posted 5 months ago
0 Replies
0 Total Likes

Hello WL community,

I have a very simple web app I'm creating for my building. One of the goals is to notify residents on the same floor about laundry events - e.g. you left your clothes in the washer, etc.

I'm using the Twilio service which I can connect with no problem and send text messages with. So I created a function that simply takes a floor and message and via a dataset picks the phone numbers for that floor and sends them the text message. Simple.

Twilio setup


Messaging function:

sendLaundryMessageTwo[laundryMessageTwo_,laundryFloorTwo_]:= For[i=0;z=residents[Select[#Floor == laundryFloorTwo&], "Phone"], i<Length[z], i++; sendLaundryEvent[z[i],laundryMessageTwo]]

Web form:

CloudDeploy[FormFunction[{"bmessage"->"TextArea","bfloor"->"Number"},sendLaundryMessageTwo[#bmessage, #bfloor] &]]

Now the problem: If I use the function from the cloud notebook like this it all works and sends txt messages are received:


But when I fill in the web form and I submit all I get is a blank page with a just a footing that says "Powered by Wolfram Cloud." No debugging info, status or anything. I don't have access to the Desktop version of WL/Mathematica so I can't test it there but I find it surprising that when used via Wolfram Cloud no feedback is given in situations like this.

Have you experienced this before? Any suggestions? Should the app be structured differently?

Thanks, Jose

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract