This site is no longer updated.Go to new Conversational Cloud docs

fileEvent


The fileEvent event is triggered when the user sends a file to the bot.

fileEvent is supported by all inbound channels except JivoChat, Zendesk, and Zendesk Chat.

File data

In the state where fileEvent was triggered, you can obtain the file data from the $request.data.eventData object:

[
   {
      "url": "https://example.com/file.pdf",
      "type": "file",
      "mimeType": "application/pdf"
   }
]
  • url is the link to the file.
  • type is the file type. Possible values: file, image, audio, video.
  • mimeType is the file MIME type.

How to use

state: AcceptFile
    event!: fileEvent
    a: Use the following links to access your files:
    script:
        $request.data.eventData.forEach(function (file) { $reactions.answer(file.url); });