We’ve changed our name! API.AI is now Dialogflow. Learn more here.

Twilio

Dialogflow Twilio Integration for SMS allows you to easily create Twilio bots with natural language understanding based on the Dialogflow technology.

Setting Up Twilio

In order to set up the Twilio integration for your agent, you'll need the
following:

Creating a Messaging Service in Twilio

  1. Login to Twilio, click on the three horizontal dots, and then Programmable SMS.

  2. Click on Messaging Services and then the Create new Messaging Service button.

  3. In the resulting window, enter a Friendly Name for your Messaging Service and choose your Use Case.

Setting Up Dialogflow

  1. In Dialogflow, go to Integrations in the left hand menu.
  2. Click on the Twilio (Text Messaging) tile.
  3. Copy the Request URL.
  4. Click the Start button.

Continuing Twilio Setup

To continue the setup you need to enable a number to use for the SMS messaging service. Once you have a number, you need to link it to Dialogflow.

Adding a number

  1. Click on Numbers then the Buy a Number or Add an Existing Number button.

  2. Set your search criteria, then click the Search button.

  3. Click the Buy button for the number you want to use and then click the Buy This Number to confirm.

  1. Under the setting for your messaging service, check the box under Inbound Settings for Process Inbound Messages.
  2. Paste the Request URL from Dialogflow, into the Request URL field.
  3. Click the Save button.

  4. Navigate back to your Dashboard and make note of your Account SID, Auth Token, and Service Phone Number.

Continuing Dialogflow Setup

  1. Under your Twilio integration settings, enter the following information:

    • Account SID
    • Auth Token
    • Phone Number

  2. Click the Save button.

Testing

You can test your bot by sending a text message to the messaging service number.