Bot Response From Custom Actions

Hello,

I wanted to know if its possible when passing response (in the custom action) back to the user through the dispacth method if i can be able to write give response specific for telegram,messenger and webchat at the same time

Thank you in advance.

Hi @kkiarie,

That is possible.

Have you tried this? Responses

Otherwise you have to write code in combination with the dispatcher in custom action. Unfortunately I don’t have a format for you.

In the custom action, you can use the channel from the tracker. something like

if tracker.get_latest_input_channel() == "telegram":
    dispatcher.utter_message(template="utter_some_template")
else: 
    dispatcher.utter_message(template="utter_another_template")

Thank you , let me try it out.