Notifications
Announcements
Hello,
We are trying to retrieve the url or referer from which the copilot is executed.
For the moment we haven't found a solution, either using power automate or native functions.
Do any of you have an idea of how to retrieve the url of the chatbot execution?
Thanks a lot
You mean the URL for the page in which the copilot is embedded? You can pass that as a parameter: https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-variables-bot?tabs=webApp#set-global-variables-in-an-embedded-bot
Hi Adilei,We tried like that with using Global, but it looks not work. We tested with endpoint, custom canvas and copilot embedded with query string (ex : &url=beta)
But to get that query string from a topic for example, copilot ask a Global var with a predefine value; We cannot create a variable without default value, and that one looks always overwrite query string..
Online documentation you provided indicate how to send query string, but not how to use it as global. Do you have any idea about that ?We only found that https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-variables-bot?tabs=webApp not indicating how to manipulate query string.
Kind regards
Did you check - "External sources can set values"?
https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-variables-bot?tabs=webApp#set-a-global-variables-value-from-external-sources
right !
it looks cache problem (on copilot ?.. or config), first time we get it, then the query string is always "old" value and overwrite with first value entered.I mean everytime we refresh browser (or private window), value is always the same..
The value stays the same in your JavaScript? Or does it change and only the global variable stays the same?
No, if I open on browser that URL :https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=john&name=wooI'll get firstname & nameif I change or refresh with https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=betty&name=boopI'll get "john woo" displayed and not "betty boop" I want.We tried to play with "clear all variables" without success, like cache on bot side.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 250 Super User 2025 Season 2
Romain The Low-Code... 197 Super User 2025 Season 2
S-Venkadesh 103 Moderator