How to send an attachment in response from Rasa core action. For example , User ask for a particular document/template which can be a doc, excel or pdf. how can i return it in response so that it can download at user end.
Hi @Akashvijay22, you cannot directly download files through an action. you could however write a custom action that locates the file, uploads it to a server and returns the download link as an utterance
Hi Asya, If your data is not huge then pass data in json to client( front end ) side and use js libs for download . I did the same for excel file.
i am really new to the whle thing… so…could you share this code for the custom action mentioned here?
Hi Asya, you could just store all your files in, say, Google Drive and keep an index of download links in your custom action. Your action needs to implement logic to find the right file, and you can just utter the download link back to the user, either in plain text or as a HTML if your chat interface support it:
<a href="link to your Google drive file" target="_blank">download here</a>
To do this, use the