Processing user input from Telegram/WhatsApp

Hi! I’m building a prototype for a “beauty chatbot” and I’d need to process user images in order to process them in the backend and give recommendations back to the user.

I’ve been looking for ways to receive user input (images) directly on Telegram/WhatsApp but I couldn’t find a way to do it directly with Rasa.

I was thinking that what I could do is to create a “message broker” who handles the input from the user, checks if there’s an image, if it’s an image it calls a function to analyze it, if it’s text the broker sends the requests to the rasa API in order to get the output. I’m not convinced on this option because you add a layer of complexity, but I don’t know if there is a better option.

Any ideas on the proper way to do this?

1 Like

Hi Marian,

You could create your own fork of the existing telegram channel and you can capture the photo here, store it someplace and append the location to the user message so it will be picked up as an entity. Then, the intent could invoke a custom action that processes the photo.

You’d want a quick way to store the photo because the channel runs as part of the Rasa process.