Creating a Twilio WhatsApp or SMS Bot

Flow XO's integration with Twilio allows to connect your bot for WhatsApp and SMS. If you would like to connect your bot for WhatsApp, please see this page first for further details on how to configure your WhatsApp account with Twilio. Once you have completed that configuration, follow the steps below to connect the bot. You can also experiment with SMS and Twilio WhatsApp bots right away using our sandbox account to start testing your flows on Twilio WhatsApp or SMS right away while you go through the WhatsApp approval process.

Follow this step-by-step guide to connecting your WhatsApp or SMS bot to Twilio:

  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 Channels on the top menu bar, and click + New.
  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.
  • MMS with Twilio is currently only supported in the US and Canada (with some carrier exceptions). As long as your Twilio number is a US or Canada number and the device sending messages is also in the US or Canada, then there should be no issue with sending MMS messages. 
  • 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.
  • When sending shortcuts or using Ask a Question with choice values, the button shown on the Twilio bot will only send the 'value' text and won't display whatever is set as the choice.

Let us know how we can improve Flow XO on our feedback site.

Still need help? Contact Us Contact Us