Saurabh Tiwari
Saurabh Tiwari

Reputation: 5161

How can I add a hyperlink in a Azure bot message text

I have recently started creating a Azure Bot in Node js. I want to add a hyperlink in one of the bot response and send a proactive response after user has clicked on it. Something like:

Please click this link to complete the payment.

and the link should be a hyperlink that will redirect to an endpoint.

I have tried finding a way to achieve it but so far, I haven't been able to achieve. I have seen the following link:

https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-send-activity?view=azure-bot-service-4.0

https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-add-media-attachments?view=azure-bot-service-4.0&tabs=javascript

Can some one suggest me the way to achieve this.

Upvotes: 2

Views: 2069

Answers (1)

Rajeesh Menoth
Rajeesh Menoth

Reputation: 1750

You can use markdown syntax.

The text must be treated as markdown formatting and rendered on the channel as appropriate.

Hyperlink markdown syntax :

[click this link](https://www.google.com/)

As per your code it would look like the following:

Please [click this link](www.greetings.com) to complete the payment 

Reference:

  1. Format text in chatbot
  2. Markdown syntax

Upvotes: 5

Related Questions