Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Can we pass a bot question via URL parameter?

(0) ShareShare
ReportReport
Posted on by 14

I created a basic bot in Copilot Studio and I published it on the demo web.

 

The URL is in the form of: https://copilotstudio.microsoft.com/environments/xxxx/bots/crb1f_xxxx/canvas?__version__=2

 

Is there a way to pass in a bot question as a parameter in the URL string instead of typing it on the demo web? Appending something like "?question=testing" to the URL.

 

I would like to be able to query the bot using links (so that I can embed them in some content), how would one go about doing this?

Categories:
  • c3rberus Profile Picture
    14 on at
    Re: Can we pass a bot question via URL parameter?

    Thanks, I got this to work now.

  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: Can we pass a bot question via URL parameter?

    Hi , @c3rberus 

    Thanks for your response and the link sharing to me! I'm also newer to PVA 😀

    Sorry for that i may misunderstand your need. Do you mean you want to pass the global variable to the bot?

    I test it in my side , if you want to pass the global variable to the bot, you need to use the embed copilot.

    vyueyunmsft_0-1712802213068.png

     

    So this is my bot test:

    vyueyunmsft_1-1712802239578.png

    And we need to publish it and then get the embed html code.

    Then we can add the url parameter here:

    vyueyunmsft_2-1712802315627.png

    Then we can make this file as xxx.html and open it to test:

    vyueyunmsft_3-1712802377213.png

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • c3rberus Profile Picture
    14 on at
    Re: Can we pass a bot question via URL parameter?

    Are you sure? It seems to be documented here..

     

    Use variables to carry content across topics - Microsoft Copilot Studio | Microsoft Learn

     

    Looks like there is a section for "Set global variables in an embedded copilot" however it is referring to Power Virtual Agent URLs..

     

    https://web.powerva.microsoft.com/webchat/bots/12345?UserName=Renata

     

    How does one do this using the new URLs.. below does not seem to work.

     

    https://copilotstudio.microsoft.com/environments/xxxxx/bots/crb1f_xxxxx/canvas?__version__=2?UserName=Renata

  • v-yueyun-msft Profile Picture
    on at
    Re: Can we pass a bot question via URL parameter?

    Hi , @c3rberus 

    As searched , currently there seems has no feature and url parameter to pass the question in Copilot.

     

    Best Regards,

    Yueyun Zhang

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#1
Pablo Roldan Profile Picture

Pablo Roldan 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard