Hi all,
I wanted to send multiple attachments within one custom action but it will only work if I send one at a time… Is there a way to make this possible?
Here is my custom action:
class ActionCalculateFoodEmission(Action):
def name(self):
return "action_calculate"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
result_message = calculate(category, name, freq)
data={ "title": "Title", "labels": [ name1, name2, name3, name4, name5 ], "backgroundColor": [ "#36a2eb", "#ffcd56", "#ff6384", "#009688", "#c45850"], "chartsData": [ serv, serv2, serv3, serv4, serv4], "chartType": "horizontalBar", "displayLegend": "false" }
message={ "payload": "chart", "data": data }
msg = { "type": "video", "payload": { "title": "Link name", "src": "https://youtube.com/embed/9C1Km6xfdMA" } }
dispatcher.utter_message(text=result_message, json_message=message)
dispatcher.utter_message(text="", attachment=msg)
return []