Workflow SMS error. "From" field missing or invalid

Hi,

I’m setting up my first Workflow using the SMS feature but I’m getting an error (in the Audit log which I think I’ve paste the relevant info) says the SMSFrom field is invalid or missing. This SMS action is the 2nd of two. The first action is an outbound email and that works fine.

“ActionNotPerformed”: “2 errors present.”,
“ActionResults”: “Created 1 ActionResults”,
“Action Type”: “SMS”,
“Action Name”: “SMS”,
“Errors”: “Error: Workflow rule ‘SMS’ field ‘SMSFrom’ contains invalid phone number ‘+447476555623’. Error: No SMS was created because ‘From’ is missing or invalid.”,
“From”: “”,

The AppSheet logs are suggesting AppSheet doesn’t recognise the number I’m entering. The From field is also blank which I can’t tell is related or separate? Could I be entering the Twilio number incorrectly? I’ve tried multiple variations of entering the number - within quote marks, with the + symbol. This is also the 2nd Twilio number I’m using. I had a trial number which I activated and then purchase this second number when the activation still wouldn’t work.

I’m based in New Zealand and the two Twilio numbers (US CA +66 and UK) I purchased have been tested using Twilio’s API Explorer tool and both SMS were successfully delivered to my target mobile number.

I’ve gone through the AppSheet docs and the community and the instructions of setup seem straight forward. I just think I’ve been inside a tunnel too long to now see any obvious mistakes I made. Are there conditions for configuring SMS / Twilio outside the US?

Any suggestions or tips on how to handle / resolve my issue would be greatly appreciated.

Thanks

Solved Solved
0 8 1,179
1 ACCEPTED SOLUTION

You need to list all the country codes your custom twilio will be handling regardless of it being From or To.

View solution in original post

8 REPLIES 8

I have not run into this issue before, but I can try to help. Just to cover our basis, after you purchased the two numbers from Twilio, did you configure AppSheet to use your Twilio account (instead of the default AppSheet account) as listed in the instructions at the bottom of this article? https://help.appsheet.com/en/articles/961993-sending-sms-from-a-workflow-rule-or-scheduled-report

Hi Kamila,

Thanks for picking up my call for help.I have set the Channel to _Custom_Twilio_SMS and have include a screen shot of this plus the numbers I’m using. Note: the screen shot shows the Twilio TOKEN and SID removed but I do include them in my actual test / workflow. I’ve also redacted the target mobile number the text is destined for.

Screen shot image removed from this update.

I do think it is something I’ve done wrong or something I don’t know about how AppSheet and Twilio work together. I’ve not used Twilio before.

I’m happy to go back to the very basics of a workflow and even selecting a Twilio number that will allow SMS message to reach the New Zealand telco network.

Thanks

Considering the amount of information we would be sharing, this might be a case for support@appsheet.com - let us know if they come to a solution.

Hi Kamila,

Do I log this with support@appsheet.com or have you already logged it?

FYI, I’ve added a screen shot of my workflow UI.

Thanks

We validate the From phone number using a C# version of Google’s libphonenumber.
We pass in the country code and the phone number you provide.
The libphonenumber tells us whether the phone number is valid for that country code.

I presume the +44 number is for the UK, so you should specify country code “GB”.
For the US number you should specify country code “US”.

When you specify the phone number you can include or omit the leading +, so the following are equivalent:
4255551212
+14255551212

Thanks Philip. That suggestion has solved the From error but I’m now getting an error for the To field / number. Here is the data from the log.

“ActionNotPerformed”: “2 errors present.”,
“ActionResults”: “Created 1 ActionResults”,
“Action Type”: “SMS”,
“Action Name”: “SMS”,
“Errors”: “Error: Workflow rule ‘SMS’ field ‘SMSTo’ contains invalid phone number ‘64nnnnnnnnn’. Error: No SMS was created because ‘To’ is missing or invalid.”,
“From”: “+44nnnnnnnnnn”,
“To”: “”,

Screen shot image removed from this update.

So to recap, the From number is a UK number so I’ve added the Country Code “GB” in my Workflow and this appears to have fixed the From issue. The “To” number is a New Zealand based mobile number. Does this matter, in terms of can Workflow only deliver to mobile numbers within the same country code as the From number?

You need to list all the country codes your custom twilio will be handling regardless of it being From or To.

Thank you Bahbus for the advice. That did the trick.

Much appreciated.

Top Labels in this Space