Skip to main content

Notifications

Copilot Studio - Building Copilot Studio Chatbo...
Unanswered

Adding hyperlink in chatbot response .

(0) ShareShare
ReportReport
Posted on by 12

I am getting an response from chat bot . Those response contains  URL links. I want to replace those link with hyperlink before sending the message to user . How can i do that ? 

 

I am aware of  this 

[Link Text](Link URL

 

This will not work as URL link changes as well . 

 

 

 

Categories:
  • stuermer Profile Picture
    stuermer 64 on at
    Re: Adding hyperlink in chatbot response .

    Here you can find an example. It takes the generative answer and transforms it into URI components. With that we can identify a value to split the answer and the hyperlink. In the next steps we transform the answer back into a proper string and then we concat all blocks together, using the PVA markup syntax [Link Desc.](Link) . This should just show the concept, the solution is really static. E.g. it does not support multiple links and it uses ": " to split Text and URL. But the result is what you were asking for 🙂 

     

    stuermer_0-1693307714624.png

    stuermer_1-1693307726806.png

     

     

    If this solves your problem it would be great if you can mark this as the solution for your problem. Let me know if it works out for you.

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Adding hyperlink in chatbot response .

    As suggested by @stuermer, I would indeed explore using a Power Fx formula to manipulate the generated answer variable before sending it to the user, and if not possible in Power Fx, I would explore the same using a cloud flow.

  • pathfinder1729 Profile Picture
    pathfinder1729 12 on at
    Re: Adding hyperlink in chatbot response .

    One approach would be to that every URL  title could be same like "Support Docs"

     

    Another approach would be that  i cut few sections form Url(like the last word ) and use it as title 

  • stuermer Profile Picture
    stuermer 64 on at
    Re: Adding hyperlink in chatbot response .

    In the properties of the "Create generative answers" Action you can un-check the option that the Bot automatically post a message. What you can do instead is to create an action and pass the Answer Variable to Power Automate and try to do some trim / replace expression magic and transform the links into [Link Description](Link URL) Formats. After that you can pass that answer back into the Bot. Or you can try if you can achieve something similar with PowerFX right from PVA canvas.

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Adding hyperlink in chatbot response .

    What should be the title of these URLs?

  • pathfinder1729 Profile Picture
    pathfinder1729 12 on at
    Re: Adding hyperlink in chatbot response .

     

    I want to have  hyperlinks to those URL in response , as those Big url do not look good .

     

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Adding hyperlink in chatbot response .

    @pathfinder1729, can you provide an example?

  • pathfinder1729 Profile Picture
    pathfinder1729 12 on at
    Re: Adding hyperlink in chatbot response .

    So  I am getting the links from  "Create generative answers " block,  and I don't want   Url  in my response , instead i want hyperlinks to those url 

  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Adding hyperlink in chatbot response .

    Hi @pathfinder1729,

     

    If you're saying the links are dynamic, then use a Power Fx formula to have Markdown URL formatting + dynamic values stored in variables.

     

    Example:

    "[" & Topic.URLName & "](" & Topic.URL & ")"

     

    HenryJammes_0-1693302510834.png

     

    Henry

     

  • stuermer Profile Picture
    stuermer 64 on at
    Re: Adding hyperlink in chatbot response .

    Hey @pathfinder1729

     

    Is the URL link part of a topic or do you get the link from a Power Automate action?

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard

Featured topics