web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Copilot Studio ChatBot...
Copilot Studio
Answered

Copilot Studio ChatBot - HTTP request with variable question

(0) ShareShare
ReportReport
Posted on by 12

Hello guys, I have a question about the HTTP request step. I would like to perform a GET request with a variable that was previously collected from the requester.

For example:

  • I ask, "What's your telephone number?"
  • The requester responds: 551999366165
  • I save this telephone number in a variable (telephone) and use it inside of an HTTP request as a query.

Here is an example: https://br-demo-5.topdesk.net/tas/api/persons?query=phoneNumber==${telephone}

I've tried using (Topic.telephone), ${telephone}, and other methods, but nothing has worked yet.

Here's the problem: I don't know how to use a variable within the URL. Is there a correct way to do this, or is it not possible?



Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @fbanik ,

     

    Please try this

    vxiaochenmsft_0-1715307718602.png

     

    Best Regards,
    Wearsky
  • Umianta Profile Picture
    290 on at

    Hi @fbanik 

     

    You can utilize the Power FX concatenate function to construct a URL incorporating variables. Refer to the example below for illustration.

    Umianta_0-1715308196071.png

     

    If this was helpful:
    Please mark it as a solution
    Give me a thumbs-up
    Connect on LinkedIn
    I consistently upload technical videos. If you're interested, please visit and subscribe to my YouTube Channel
    Always glad to help, Umesh Khandelwal!

     

  • fbanik Profile Picture
    12 on at

    It worked, thank so much!

  • kush-sg Profile Picture
    on at

    @fbanik 
    @v-xiaochen-msft 
    @Umianta 
    Hello guys

    I am encountering the same issue. Could you please help me? I have attached a screenshot below.

    Problem: I stored a value inside a variable (Var1) and tried to pass it in the HTTP POST request body.

    Value that i want to pass (Var1)Value that i want to pass (Var1)Payload - HTTP Post requestPayload - HTTP Post requestResponseResponse

  • Umianta Profile Picture
    290 on at

    Hi @kush-sg 

     

    It seems you are not assigning variables correctly. Use Power Fx formulas when creating JSON with variables. See the example below for guidance.

     

    Umianta_0-1716775823726.png

     

    If this was helpful:
    Please mark it as a solution
    Give me a thumbs-up
    Connect on LinkedIn
    I consistently upload technical videos. If you're interested, please visit and subscribe to my YouTube Channel
    Always glad to help, Umesh Khandelwal!

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard