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
No, if I open on browser that URL :
https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=john&name=woo
I'll get firstname & name
if I change or refresh with https://copilotstudio.microsoft.com/environments/Default-xxxxx/bots/xx/webchat?__version__=2&firstname=betty&name=boop
I'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.
The value stays the same in your JavaScript? Or does it change and only the global variable stays the same?
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..
Did you check - "External sources can set values"?
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
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
Ekta Gupta
4
stampcoin
2