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"
Let me just say I wrote this Twilio Utilities plugin before Appian Integration Objects were a thing. This is definitely the preferred way to go with modern Appian.
Hi, Jim. Thanks for helping me out on Friday (I think it was you). As you and Steven suggested, I'm trying to loop the process model so that I can send a single SMS to multiple phone numbers. The relevant portion of my process model and the XOR configuration are shown below. As configured, the email is sent to the address hundreds of times, and the SMS is never sent at all. Quite a combination! Any ideas on how to properly configure the looping? Thank you
I don't think you are hearing us regarding moving away from this plugin and using the Appian Integration Object instead. But if you just want this to work as is... you do not have to create a manual loop in the process. You can configure to node to run multiple times on the node configuration itself.
Then put pv!arrayOfPhoneNumbers (or pv!arrayOfPhoneNumbers[tp!instanceindex] if that doesn't work) in the value of the "To" field on the "Data" -> "Inputs" tab.
Hello Steven Miccile.I really appreciate your help on this; I have no prior experience as a coder and this online community has proven invaluable.
I noticed in your snapshot that you have a multi-value variable to choose from in the drop-down box. I've attached my own snapshot; I don't seem to have this option. I added a process variable, however (snapshot included). Could you advise? I think I'm getting very close to the answer
pv!phoneNumber has "Multiple?" set to "No". Click on that variable and click the checkbox to make it a multiple.
Hi, Steven Miccile
I configured the below as you showed, but I still can't send multiple text messages. I think I'm out of ideas. Do you have any? Thanks.
Did you also try pv!phoneNumber[tp!instanceindex]?
Now you need to start debugging your instances to figure out how it is running. When you monitor the process instance:
How many times does the node run (right click on it)?
What does the pv!phoneNumber variable value look like (go to variables)?
Yes, I'm using pv!phoneNumber[tp!instanceindex.
The process model is reporting no errors. The Send Twilio SMS node has the correct number of instances (below). The variables look correct. This is how the phone number variable are listed (I'm sending a message to four recipients):
1222222222;1333333333;1444444444;1555555555
According to the readme, this is the right format (11 digits, "1" following the phone number). Any ideas? jims419 Could you look this over, please? Thanks, everyone.
Steven Miccile Is it possible that it's not sending multiple text messages because I'm on a test account?
It is likely either a node configuration mistake or a Twilio limitation since it worked for 1 phone number.
Are you the owner of all 4 phone numbers? Also did you verify all numbers in Twilio?
https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account
I'll check the nodes. Thanks