Dialogflow Workers

A Dialogflow worker takes user input and sends it to a Dialogflow bot for natural language processing. A DialogFlow worker can be created through the CLI or through the Add Resource button on a bot’s detail page.

Type: NLP Worker

Secrets

An Google DialogFlow agent access key is required in order to access Lex. Please see secrets for more information.

Other Dialogflow fields

  • projectId: ProjectId of the agent to be used. See our Dialogflow bot tutorial for more information.
  • secret: Google DialogFlow agent access key.
  • syncResponsesToNLP: Takes the responses in your ServisBot Intent and syncs (where possible) the values to DialogFlow.
  • enableML: Turns on the ML feature for all intents in this bot in DialogFlow.

Creating Dialogflow worker through cli

Save this json to a file and create a worker using the cli command sb-cli worker create file.json


{
  "Data": {
    "projectId": "projectId",
    "secret": "srn:vault::organization:secretdoc:arch",
    "syncResponsesToNLP": true,
    "enableML": true,
    "language":"en"
  },
  "Organization": "organization",
  "Config": {
    "Avatar": "default-bot"
  },
  "Enabled": true,
  "Description": "A worker which reaches out to DialogFlowV2",
  "Type": "r2-dialogflow-v2-worker",
  "Name": "exampleDialogflowWorker",
  "Status": "published",
}


Once you have created the worker using the CLI, it will return an ID for you. You need to then update/create a bot and place the filter worker at the top with the id and the type of r2-dialogflow-v2-worker

Language support

If you have a language set inside the config of your worker we will sync any sb intents to dialog flow under that language code. If none is set we will default this to en (english). A list of language codes can be found here.