Creating a bot integration with the Twilio channel
You can create a bot integration with the Twilio channel when you deploy a chatbot on IBM RPA on premises.
Before you begin
Requirements:
- Create a chatbot instance. See Creating a chatbot instance for instructions.
- Create a chat mapping for your chatbot script. See Creating a chat mapping for instructions.
- Create a Twilio account
.
- Get a Twilio phone number with SMS capability.
Procedure
Create a TwiML application
- Open the Twilio Console
.
- Click Create new TwiML App. Fill the fields according to the following values:
- In the Friendly Name field, enter a name for your TwiML app.
- In the Voice Configuration section, leave the Request URL empty.
- In the Messaging Configuration section, define the Request URL to
https://sms.botframework.com/api/sms
.
- Click Create.
Add a phone number to Twilio
Follow the instructions in "Adding a Verified Phone Number or Caller ID with Twilio "
to add a phone number to Twilio. As result, you can see your verified number in Verified Caller IDs page on Twilio Console.
Define TwiML app to use for messaging
- Open the Twilio Console
.
- In the Phone Numbers > Active numbers, click the number that you want.
- In the Configure > Messaging section, from the Configure With list, select
TwiML App
. - From the TwiML APP list, select the TwiML app that you created.
- Click Save.
- Optional: Go to Active Numbers again to review the active configuration defined.
Gather credentials from Twilio
- Open the Twilio Console
.
- In Account Info, copy and save the following data from the project dashboard:
Account SID
Auth Token
Enter Twilio credentials in the Azure portal
- Open the Azure portal
.
- Go to your resources and click the Azure Bot you want.
- In the Settings menu, click Channels.
- In the list of available channels, click Twilio (SMS).
- Enter the Twilio data and credentials as you saved before:
Phone Number
Account SID
Auth Token
- Click Apply to save your configuration.
What to do next
Test your chatbot connection with Twilio by sending an SMS message to your Twilio number. It must send a message back to you after it receives your message.