Creating a Twilio SMS Bot

Follow this step-by-step guide to creating a Twilio SMS bot:

  1. First of all, you'll need a Twilio account. Head over to https://www.twilio.com and sign up.
  2. If you already have a Twilio phone number that you want to use with Flow XO, you can jump to step 7.
  3. In the Twilio console dashboard, look for the All Twilio Products > Numbers section, and click on Phone Numbers.
  4. Now click Buy a Number (if you have a trial account, you won't actually be buying the number, you'll just use some of your trial credit).
  5. Tick the SMS capability, and click Search.

  6. When you've found a number you want to buy, click the Buy button.
  7. Now go to Flow XO, click Bots on the top menu bar, and click New Bot.
  8. Choose Twilio SMS as the platform.
  9. Type in a name for the bot.
  10. If you like, you can fill out the Welcome Text box. This is optional.
  11. Next, go back to the Twilio console and click the Twilio icon at the top left. You'll now be back on the dashboard.
  12. Copy the Account SID and Auth Token from the Account Summary section in Twilio into the same fields in Flow XO.
  13. Now click the List Phone Numbers button in Flow XO.
  14. You'll now be able to choose the phone number that you want to use (the one you just bought, unless you already had one ready). Alternatively, you can copy in a Messaging Service SID. Click Next.
  15. Skip this step if you chose a phone number in the previous step. You'll now see a URL that you'll need to copy back into your Twilio account. Go to the Messaging Services section in Twilio, and click on the name of your service. Look for Request URL, and copy in the URL that you see on screen in Flow XO. Click Save in Twilio.

  16. Click Save in Flow XO to create the bot.

Important Information

  • By default, Twilio will automatically respond to keywords such as HELP, STOP (and certain others) for you. However, Twilio will disable this behaviour if you ask them to. You can find more information in their help document.
  • You can use a Twilio Shortcode instead of a phone number. To do so, you'll need to set up a Messaging Service in Twilio and add the shortcode to that. Then, when setting up your bot in Flow XO, provide the Messaging Service SID instead of selecting a phone number.
  • Unlike other platforms, there's no equivalent to a bot install step on SMS. So the user will only see the welcome message and New Conversation will only trigger when the user types "hello", "start" or other reserved keywords.

Still need help? Contact Us Contact Us