While building your conversational AI application, you may need to provide the capability for your chatbot to accept a file upload during a text interaction.

The Prompt for File/Attachment in UI Builder makes this possible.

<aside> 💡 This capability is currently supported on the Webchat channel.

</aside>

In this How To, you'll learn how to implement a dialog that asks the user to upload a file. The file will then be uploaded and the download link will be returned. This How To assumes you are familiar with the fundamentals of UI Builder and already know how to create dialogs.

To implement file attachments perform the following steps:

  1. Add a new dialog to the designer canvas. Call it FileAttachments and select the Begin Dialog trigger:

Untitled

  1. Click on the + node and select Ask a question → File or Attachment:

Untitled

  1. The new action will be added to the designer canvas. Click on the Prompt node ****and click on the link Add Alternative. Set the Text property to: please supply a document: