Include media in Rasa bot


I would like to include media content in some of my bot responses. Images and short video clips. However these are images/content I have on my local machine. How can I include this on the bot?

Currently, I can only include "image: " followed by an https link in "responses: "


@ml2021 Please try this:

For Video:

  - text: "Please see our Premiere video"
    attachment: { "type":"video", "payload":{ "src": "" } }

For Image:

  - text: The engineers at Rasa 🛠

It is also depends on the front end you are using, the above suggestion I implemented using Botfront.

Note: Please do use the embedded URL only.

If you got any issue do let us know. I hope this will solve your query. Good Luck!

1 Like

Thanks for your reply. Your suggestion works if images or videos are hosted online, but my question is how to achieve this with media from my local machine? Do I need to use an API for this?

@ml2021 At, the end your bot will be live for users, then how you will show the image and videos from localhost? You can store it in google drive and generate the link.

Thanks for suggesting. I tried to store media content on a public google drive folder, generated the link, but when opening Rasa X the bot does not show anything. Any suggestion on where i should host it in order to work?

@ml2021 You directly copy the shared link (public) and pasting on in the domain.yml and you are not able to see anything? Right

If yes, please follow these steps:

Step 1: Generate the google drive shared link (public) copy it and

Step 2: Paste it on this link and generate the link and paste it in domain.yml.

If No, please tell me what steps you are doing.

Please mention my alias and @ so, that I get notification.

@nik202 Yes that is exactly was I did. Thanks, this worked. After pasting the Recmail link to domain.yml the image is properly displayed in Rasa X (although it takes a bit to load). Will this also work if I integrate an app like whatsapp, slack or telegram? I will try it next

@ml2021 Yes, I hope so :slight_smile: