Sending clickable links in response from custom actions

Hi,

I’m using a excel sheet with links(saved as text) and reading it in custom action to send those in response.

In the response from chat bot the links are not clickable. How can I make the links clickable in the response?

Also how can I send response in the format of a table?

@ramyanarwa Hello again!!

Right, for that first you need to link the excel sheet with custom actions i.e its should read the values of the excel sheet cells.

Excel sheet should have particular formate such as link.csv

question | link

Snippet code for demo purpose only:

class GetLink(Action):
    def __init__(self):
        self.link_data = pd.read_csv('./data/link.csv')
    def name(self) -> Text:
        return "action_get_link"

   def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

        query = tracker.latest_message['text']
        print(query)
        questions = self.link_data['question'].values.tolist()
        

Now, it’s your thinking about how you should proceed with the code and match the question and fetch the corresponding values, and display them in the dispatcher.

dispatcher.utter_message(text=" This is the {link} related to your query")

I have given you the hint and code. Hope this will help you in the right direction and good luck!