How to pass images in the RASA custom Action Server


Hi Team,

We are working on a Ticketing tool where we want to upload the images as an attachment and pass the image (as a blob or other format) to store in the Database.

Is there a functionality already existing, which can help with this? If not, how can i pass an image (as a payload) through RASA?

Best Regards, Ankit Pachauri

Hi @ankit. If I understand correctly, users who have a conversation with your assistant will send an image to the assistant. What channel will you be using?

Hi @tyd,

We have deployed the chatbot on our own website using JS. So we don’t have any specific channel (FB / Slack etc.) for the conversation.

Best Regards, Ankit Pachauri

Are you using the socketio or rest channel for that JS app?

Hi @tyd, we are using socketio for the JS app.

Best Regards, Ankit

Hi Team,

Request a solution for this peculiar issue.

Best Regards, Ankit

Hi @ankit, you can provide other parameters to your incoming message other than sender and message.

As long as your channel implements the get_metadata method to process any extra information you add to the request, the metadata will be attached to the message in the UserUttered event and you can use the information in your custom actions.

I think it’s better to handle the image upload itself separate from the Rasa communication. Do the image upload from the UI directly to S3 or some other upload service, then send the response to Rasa that the upload is completed with the path to the uploaded file as an entity or something along those lines.

hey can we get a detailed tutorial to how we can customize and make use of file for our custom UI website.