Importing Sb-Intents (Syncing with Dialogflow)

In this tutorial we will import intents into ServisBOT and sync them with Dialogflow.


The following items are required before importing intents and actions into the ServisBOT platform.

  1. Dialogflow project and account with the Owner permission
  2. A ServisBot Dialogflow V2 Secret - Create a Dialogflow V2 Secret.

Create your bots

For this demo, use the Dialogflow V2 Bot blueprint.

Define your Bot’s intents

Take note of your bot’s name in the system and then use our common definition format to define the intents, utterances, and actions.

eg. utterances.csv

Sbimport,howAreYou,how are you
Sbimport,howAreYou,how are u
Sbimport,botimport,how does the intent import work
Sbimport,botimport,what does the import function look like
Sbimport,botimport,How do I import intents

Sample Utterance File

Actions are expected to be in the following CSV file format.

eg. actions.csv

Sbimport,howAreYou,fulfilment,markup,"<TimelineMessage>\n\t<Card title='Im doing great!' imgUrl=';g' alt='Lovely image' />\n</TimelineMessage>"
Sbimport,botimport,fulfilment,message,You first set up your csvs for intents and for actions then import them


Column Label Required Default Notes
bot True the botname for the bot you are assigning it to
intent True the intent alias you want to set an action for
lifecycleTrigger False fulfilment Whether you want your action to be triggered when the intent is detected (but slots are still pending) Detection, or once an intent is ready to be fullfilled.
value True the value of the response

Sample Action File

lifecycleTrigger and type are optional columns. Everything defaults to “Fulfillment” and “message”

Import your intents

You can use either the Portal or the ServisBOT CLI to import your intents.

Importing through the Portal

In the Intent tab of each Bot page you can use the Import Intent button to upload your utterance and action CSV files.

Importing through the CLI

“botName” relates to the name of the ServisBot bot that you created - not the name of your Dialogflow Bot. “utterances.csv” and “actions.csv” can be supplied as the directory path to each associated file.

sb-cli intent import utterances.csv actions.csv

Available in version 2.11.1 and later

After importing intents, you should be able to see your intents by navigating back to your bot detail pages, and exploring the Intents Tab.

Play and Test

  1. Navigate to your bot in the Bot Army Section of portal.
  2. At the top of the bot detail page, click on the Publish button.
  3. Wait for the Your bot has been successfully published, click on the Test button.
  4. Once you are on the test page, you can interact with your bot.