HTTP Request Integration for making API Calls in A...
# 📖tutorials
w
Some explanations about it : english :

https://youtu.be/1xl-OWR51iI

french :

https://youtu.be/I1HLbFJfXbY

I hope this will simplify the process for some people! https://cdn.discordapp.com/attachments/1275392486260477984/1275392486495490080/image.png?ex=66c5b950&is=66c467d0&hm=1b1168f68b6a5e603358ac4298c37f770f8f1c3c4efba0ec877ba077de2e3e80&
don't hesitate to ask questions if you have any
s
@wooden-beard-40210 how to use variables inside the body request?
I mean, I want to use the variable user.Name inside the body request
but, if you're not using an auto node, you can set your body payload in a code card above the http request card
and if you're using it in an autonode, you can just prompt it to pass this or that variable in the body
w
its amazing, great work 🔥
w
thanks !
g
i had few question abt botpress, is it ok if i dm you?
w
Yes sure
s
@wooden-beard-40210 why the bot is in loop? What's happening?
w
Can you precise what’s happening ? Make a post in #1111009377525186570 it will be more convenient to follow 😉
s
Sure!
g
thx, just accept my friend request so that i can directly text you
c
Hello ! thanks for the video :). Im using your HTTP request for a simple node. But how can i "Change" the way the user see the answer ? In my case I have a list of different deals to get, but then i would like to show to my user the list with only the name (so they can chose) Thank you very much !
w
you're welcome 🙂 the output is the exact response of your API call so if you save this output in a variable (likely to be a json array) you can access the different elements of your array by using workflow.variable.key
or maybe you can share what you response is and what you want to display
c
Thank you, I probably did wrong. On the pic you have my API answer (stock in a workflow varible : workflow.DealList. But i just want to put the Name on the output. I tried workflow.DealList.Name but it doesn't work. (sorry im a beginner !!) https://cdn.discordapp.com/attachments/1275392486260477984/1277580762652348508/image.png?ex=66cdaf4e&is=66cc5dce&hm=07e8f3947d974bbd2d30a429773ab4bd482832736d8c644bbc3dca867558ac65& https://cdn.discordapp.com/attachments/1275392486260477984/1277580762878574592/image.png?ex=66cdaf4e&is=66cc5dce&hm=d4e80d422d9722fa5e7d6d79c959f38dca9f1c3296fd5d4ada4a50c90ba69504&
w
okay, so your variable is in array, with another array inside of with, with other arrays inside of these arrays 😂 to target the name "azimuts", just write this :
{{workflow.DealList.results[3].Name}}
let me know if this works
c
w
oh yeah i didn't see the two 'responses'
try
{{workflow.DealList.response.response.results[3].Name}}
(and is will be the same "structure" if I want to show them not just Azimuts but all deals name in the 6 items of the result?
w
that doesn't mean that will not work!
yeah, just change the
3
c
Oh you are right ! its working !!:) Thank you soooo much One last question I promise.. you told me that i need to change the 3 but can I give just one output with all the deals (it could be 20 deals) and then let the user choose the one? Again thank you sooooo much you made my day 😄
w
hum yes you can create a list with all the deals for exemple, just make a loop on the length of workflow.deallist.response.response.results and you'll get all the name and then you can display it to the use
w
Hello, I am having an issue, my bot needs to retrieve the data but it just cant seem to do that. Is it fine if we message in dm's? I really need help on this
w
Tell me I'll try to help
c
I used your implementation of simple http request and I find it really helpful. I just dropped by to say thank you.
b
Hello! Is there a callback function for API? After I request,i don't know when the bot can finish the answer.So what should I do ? @wooden-beard-40210
5 Views