Shortened URL

I want to send shortened URL as a response to the user. How do I do it? The front-end can show the URL just fine.

just add this URL as a template :slight_smile:

Thanks @akelad! it worked. But I want to use the url in custom actions and give it a custom name. How can I do that?

Just assign it to a variable in the action as a string, and then send it as part of your message

@akelad can you point me to some example of this thing?

I mean there’s an example of how to write a custom action here: https://rasa.com/docs/core/customactions/#custom-actions-written-in-python And it explains there how to send a message from within an action too

hi @akelad. I have gone through this page. The info is just regarding the custom links. I need an instance where the links are being used in custom actions with a custom name.

I’m not sure exactly what you mean, you can just use dispatcher.utter_message(link) within the custom action

Yeah. I have already done that like: – response = “https://abc.com”.

dispatcher.utter_message(response) return [SlotSet(‘example’,example)]

Now I want to know how to give it a custom name, because the whole link would be forwarded. Should it be done in the actions file or from the front-end?

The front end would have to deal with that