Hello! I want to create a feature in a messaging application I've made. I want to be able to sent text messages in bulk to people's phones. Is anyone familiar with how to do this? If so, what steps did you take? Thank you
Discussion posts and replies are publicly visible
Independent from Appian's Twilio component, you can simply use an Appian Integration Object to hit Twilio REST APIs (note: to do this, you will need a separate license agreement with Twilio):
https://www.twilio.com/docs/usage/api
https://www.twilio.com/docs/sms/api
Example Details:
URL: https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json
Method: POST
Request Body Content Type: Custom - application/x-www-form-urlencoded
Request Body: "From=+15555559999&To=+15555555555&Body=Hello World"
Hmm, I don't know. But I found the Twilio Utilities app and added that. In my process model, I found the Send Twilio SMS node, which seems to be right. I added my Twilio trial account's SID, Auth Token, and the other inputs.
I get the below error when I debug. As you can see, there is a value in the Auth Token field. Any ideas?
"AuthToken 'null' is not valid."
The plugin is asking for the scs (secure credential store) key, not the actual token.
Personally, I prefer using out of the box functionality over a plugin in this case. It is supported by Appian Support, easier to debug, and provides more control over the connection details.
Is the OOBF is the one that requires ICC? Thanks for your help, by the way
No this is independent from ICC. You can simply use a connected system and/or integration object to make a RESTful webservice call to Twilio's REST APIs.
Okay. Also, how can I find the SCS key?
I've entered the following into "Third Party Credentials" but it still gives me the same error during debugging. Any ideas?
If you look at the readme for the component, you can name the key for the system (left side of the screen) whatever you want, but you need to have the key for the credential field (right side of the screen) be "authToken" since this is likely referenced directly in the plugin.
I don't know how you knew it, but it worked. Thanks so much!
Steven Miccile If I may, I have one other question. I want this message to be sent to my phone as an SMS. I tried entering my number in the value box (shown below), but nothing. What am I missing? Thanks
Mmm based on the screenshot, you have nothing in the "value" field for the "To" parameter.
Fixed. It sends the messages now. However, there are just two remaining problems. The messages begin with "Sent from your Twilio trial account" and when there's formatting in the message, the HTML tags (<p>, <br>, etc) appear. Do you know how I could resolve this? Thank you
It says "Sent from your Twilio trial account" because your are using a trial account and that's how Twilio behaves. You will need a real account to get that removed.
Also, I am not sure, but I wouldn't expect SMS to support HTML tags. You could strip them using Appian's stripHtml() function or do some SMS/Twilio research on if it is possible to pass line breaks.
Okay, thanks, Steven
Steven Miccile Hello, Steven! I resolved the HTML problem with the fix you mentioned.
I'd like to be able to have my text messages filter according to applicant status. Basically, the user will use my messaging application and select the status of the applicant, and I've configured it so that the email is sent to the applicant whose email corresponds with that status. Is there a way to do the same thing with Twilio Utilities 2.0? Or is that not possible because phone numbers are hard-coded as constants? Thanks
I have an update. I was able to filter, but I can't send to more than one phone number. If I add more than one, the message is sent to neither. I may have to try and loop the process model, but I would like to work within the plug-in if possible. Do you know how I can send the message to more than one phone number? Thanks
Sending a text to a different phone number based on application status should not be difficult. The node takes an input called "To" that does not have to be a constant. It can be a process variable that can be populated however you want.
As for sending to multiple people, the standard SMS API (https://www.twilio.com/docs/sms/api) only sends one SMS to one number. If you are going to be sending to under 1,000 people, you can set up MNI in Appian on that node to loop over your "To" numbers.
Twilio also seems to have a "messaging service" feature in beta (https://www.twilio.com/docs/sms/services/api), but it looks to me like this is for a static group of numbers you always send messages to, not your dynamic use case.