Twilio SMS automation

With Activechat, you can build a Twilio SMS chatbot exactly as you do on Facebook Messenger, website chat, or Telegram. Once you connect your Twilio account, your bots will be able to send and receive text messages and control rich conversations – with natural language understanding, deep business integrations, and more.

Twilio SMS chatbot is a great tool to build SMS autoresponders and other bots that do not require social messengers like Facebook or Telegram. It’s a bit different in implementation, though, due to the fact that you can initiate communication with your users from your side (on Facebook Messenger and Telegram the bot can start talking only after the user initiates communication explicitly).

Connect your Twilio account

First of all, let’s connect Twilio to the chatbot built with Activechat. If you already have a Twilio project that you’d like to automate, you can skip steps 1-3 below.

1. Go to your Twilio console, select “Create new project” from the top left menu and select “Products” tab. Select “Phone numbers” and “Programmable SMS” and click “Continue”.

2. Give your project a name and invite teammates, if necessary.

3. Don’t forget to purchase phone numbers in the “Numbers” tab on the left (you need at least one number that your bot will use for sending and receiving messages).

4. On the top right side of your Twilio dashboard there will be “Account SID” and “Auth token” fields (click “View” to display Auth token if it’s hidden).

5. Copy these values and paste them into the “Twilio SMS” tab in your bot Settings and click “Connect”.

IMPORTANT: when you connect Twilio to the chatbot, the “start” skill will not be available for chatbot users. On every incoming message, the “default” skill will be triggered. You can either use natural language understanding or keyword detection for replies (just keep in mind that chatbot buttons will not be available on SMS) or build this skill from scratch.

Import phone numbers

Activechat allows you to import phone numbers of your audience to your bot through a CSV file. This gives you an opportunity to send broadcasts to those users from your Twilio phone number (don’t forget that you need permission from your users to send messages to them!). Please note the format of this file:

Phone_number, First_name, Last_name, tags

Example:

+19266994543, John, Golt, CEO | founder

This will add “John Golt” to your audience with tags “CEO” and “founder”.

Importing phone numbers into the chatbot is done in the “Settings – Channels” menu. Click the gear icon in the Twilio tile to access it.

When you import phone numbers into Activechat, a system event with the name “import” is triggered for each of these users. That means that if you have a skill in your chatbot that is triggered by this event, it will immediately start. Good for the welcome message and onboarding!

Everything else works exactly the same as in social messengers. When your bot receives a new message from a user, the “default” skill is triggered and you can build this skill to respond to the user’s message. Please note that IMAGE and GALLERY blocks are not relevant for the SMS channel since it’s text-only. If you have these blocks in your bot flow, they will be skipped in the conversation.

Last updated