Bot integration with Dialogflow supports the following types of messages:
TEXT
IMAGE
DOCUMENT
MENU
QUICK_REPLY
Text message
To define a text response, simply select "Text Response" from the possible response options and type one or more messages.
...
It is also necessary to configure some parameters for correct image processing. Being able to return multiple messages, even of different types, for the same intent, the parameters must end with a number corresponding to the position of the response in the sequence of configured responses.
Property | Required | Description | ||||||
---|---|---|---|---|---|---|---|---|
messageType |
| Indicates the type of response: in this case must be “image” | ||||||
fileName |
| File name including extension | ||||||
caption |
| Caption of the image |
Example
Response configured with an image, a text message and another image in this exact order.
...
To return a document as a response, we use Dialogflow “Image” response (eg. from Facebook or Telegram channel), with the url that returns the document and configured with the following parameters:
Property | Required | Description | ||||||
---|---|---|---|---|---|---|---|---|
messageType |
| Indicates the type of response: in this case must be “document” | ||||||
fileName |
| File name including extension |
Being able to return multiple messages, even of different types, for the same intent, the parameters must end with a number corresponding to the position of the response in the sequence of configured responses.
...
Finally, if the configured option is a url, an additional parameter is required (that must end with a number corresponding to the position of the option in the sequence of configured options of the menu) called target, to specify where to open the link.
Property | Required | Description | ||||||
---|---|---|---|---|---|---|---|---|
target |
| The target attribute specifies where to open the link. Possible values:
|
Example
Menu with 3 options: a link, a query for the bot and another link, in this order.
...