Need help with botpress and bland ai integration
# 🤝help
g
my workflow or whatever comes out with a weird error and i need help
// Headers const headers = { 'Authorization': 'my bot api key' }; const data = { "phone_number": "+{{workflow.phonenumber}}", "from": null, "model": "enhanced", "language": "eng", "voice": "maya", "voice_settings": {}, "local_dialing": false, "max_duration": 12, "answered_by_enabled": false, "wait_for_greeting": false, "record": false, "amd": false, "interruption_threshold": 100, "temperature": null, "transfer_list": {}, "metadata": {}, "pronunciation_guide": [], "start_time": null, "request_data": {}, "tools": [], "webhook": null, "calendly": {}, "request_data":{"name":"{{workflow.name}}"} ,"pathway_id":"----------------------" } // API request await axios.post('https://api.bland.ai/v1/calls', data, {headers})
the code im using
please help
@freezing-carpenter-9818 ?
@icy-cpu-68448
finally
someone is here
ive just been waiting
b
can you provide some more details about this error and the code you're using? and where did you get this code from?
we provide dedicated customer support to paying customers 🙂 otherwise this server is for community-based support
g
i got it from a random guy who helped me
b
it'll be difficult to help you debug if you don't understand the code you're using
g
im not paying srry
yeah i know
but
i followed you guys
tutorial thing
and it didnt work
all i want the bot to do is. 1. ask for a customers name and phone number 2. call the customer via my pathway that i created 3. store information of that call
actully how much is it?
b
I don't think that we offer a tutorial for voice calls?
g
it does
bland ai + bot press integration
b
this wasn't written by Botpress - please reach out to the Bland ai team for help
g
hm
well
how would you go about usingb botpress
to make an api request to bland ai
b
you can make API calls from the execute code card
you can learn more about this in our documentation and youtube channel
g
mhm yes and ive got that down here
and it jus tdoesnt make sense
any of it
like i run the code
and i keep coming out w that error
// Headers const headers = { 'Authorization': 'bland ai api' }; const data = { "phone_number": "{{workflow.phonenumber}}", "from": null, "model": "enhanced", "language": "eng", "voice": "maya", "voice_settings": {}, "local_dialing": false, "max_duration": 12, "answered_by_enabled": false, "wait_for_greeting": false, "record": false, "amd": false, "interruption_threshold": 100, "temperature": null, "transfer_list": {}, "metadata": {}, "pronunciation_guide": [], "start_time": null, "request_data": {}, "tools": [], "webhook": null, "calendly": {}, "request_data":{"name":"{{workflow.name}}"} ,"pathway_id":"path way id" } // API request await axios.post('https://api.bland.ai/v1/calls', data, {headers});
b
I can't help you if I can't understand the code you've written, and you can't explain that code to me
I can confirm that making API calls from the execute code card does indeed work
I suggest you reach out to the person who wrote the code, or provided this guide to you
g
okay if i copy u the code from the google doc can you check it out
it has instructions
and explanations on it
b
I can't review your code or instructions on how to use an integration, sorry
g
damnnn
f
Hi vvs, sorry for the delay in getting back to you
g
its so confusing
no its okay
f
I will take a look in a few hours
g
i noticed ur in the bland ai sever
thats why i @ you
f
Sure, I have this working already so it shouldn’t be a problem
Is that the tutorial in bland ai’s docs?
Are you sure you followed all the steps correctly. I am the author of that doc and it works well
g
yes i did
want me to share screen to you?
i changed it now
but i'll make it again
the only differences i'd like to make 1. I use a comversatioal pathway so the "task" isnt necessary
2. I want the first sentence to be the sentence in my conversational pathway on bland ai
3. I want the customers name that is entered in bot press to be used in the call made by bland ai.
i
hiii, I'm going through the code, i am trying to understand what it is for
i will tag you soon
f
What error are you getting when running this code?
g
user enters name and number of customer customer gets called by external service called bland ai
hold on
i
ohkk, wait... lemme go through screenshots
g
@freezing-carpenter-9818
am i doing smth wrong
are there any variables i need to create
f
Can you try the code but remove .first from all of the workflow.name variables
g
yes
ive set up the nodes correctly yes?
f
Yes that’s all correct, there is a problem with the code you set up or the set up in bland
g
i changed the variable name
it does say to make it phone_number
wdym the set up in bland
theres no code in bland
i want it to use a pathway how do i do that
f
This code is not set up to use pathways
g
okay but still
it should be working
it cant even work normally let alone pathways
how can i implement it to use pathways
wait if you check dms i'll show u the full code
i
I don't understand where the error is 🥲
try this code // Headers const headers = { 'Authorization': 'my_actual_bot_api_key' // Use the actual API key here }; const data = { "phone_number": "+{{workflow.phonenumber}}", // Ensure this is dynamically replaced "from": null, "model": "enhanced", "language": "eng", "voice": "maya", "voice_settings": {}, "local_dialing": false, "max_duration": 12, "answered_by_enabled": false, "wait_for_greeting": false, "record": false, "amd": false, "interruption_threshold": 100, "temperature": null, "transfer_list": {}, "metadata": {}, "pronunciation_guide": [], "start_time": null, "request_data": {"name": "{{workflow.name}}"}, // Ensure this is dynamically replaced "tools": [], "webhook": null, "calendly": {}, "pathway_id": "actual_pathway_id" // Use the actual pathway ID here }; // Async function to handle the API call async function makeCall() { try { await axios.post('https://api.bland.ai/v1/calls', data, {headers}); console.log('Call initiated successfully'); } catch (error) { console.error('Error initiating call:', error); } } // Invoke the async function makeCall();
g
okay
one min
when you say actual API key do you mean bland ai's api key
thats the error i recieve
receive
i
dang
it's too late here, i will look into this in detail... i will try as much i can help
g
get some rest.
take your time
im in no hurry @icy-cpu-68448
i
Kk :))
hii @gifted-beard-94830
I got one lead
This will fix this error
And I'm new to Bland, so idk about pathways and how to fix that... I'm sorry
Everything is going fine just the pathway part is incomplete
nothing happens
@icy-cpu-68448
i
Now the work of pathway is remaining in Bland
g
but i finished it
idk how to make it send a pathway
i
Everything's done from Botpress side, just the pathway part is remaining, that you will have to do in Bland
I'm also new to Bland so idk about pathways, idk how to create them
I'm sorry
g
i already made one
and i have its id
but idk how to code it into botpress
to basically tell botpress "hey go onto bland and use this pathway"
i

https://youtu.be/aWnNJdiza3k?si=sMU984HiAv_QllcR

If you wish refer to this link, it's easier to use Air AI, in place of Bland
Wait...
You have id?
g
yes
an id for the pathway
i
Ok, put that id in the code in botpress
g
air ai cant do the things bland can
where
tho
oh wait
yeah
i did
it didnt worj
i
Go through your code and there is place for pathway id
Ohh
You will have to fix the pathway
i
I went through it yesterday, I don't understand anything that what to do with edges and nodes
This error is because of pathway
g
fixed
one sex
i
Pathway problem, it's not initiating the call
g
fuck man
i
It's all about pathway bro
Idk how to make pathway of specific tasks
You tried voiceflow?
g
voiceflow
whats that
bro i only used bland ai so far
cuz isnt it the best
and i made my whole flow chart in bland
i
Ohk, have you built any bot before by Bland?
It's also like botpress, but in addition it provides voice chat
g
no
i
There are more differences tho
g
heres the thing
u know that video
u sent
earlier
is it possible for it to just
i
Yes
g
send a call
and thats it
i
Yes
g
or do i have to do the twillio stuff
abd the calendly
stuff
all that
i
I guess you will have to do twilio stuffs....
g
what even is twillio
i
I saw this video way back, I don't remember
g
why is this so stupidly complicated
why dont people consider how stupidly complicated they make stuff
i
Bro this is complicated 😅
g
it should be so much easier than this
its not even a hard concept
i
Concept is not hard, just many things to integrate, and that requires some code stuffs
For api keys
See that video
You will understand
g
bland ai gives me a code to use...
i
The same you have
q
Did you figure it out yet? Here is the code and bot file we used previously with Botpress and bland.ai, and it worked well https://discord.com/channels/1108396290624213082/1185426759420739614
g
says #unknown
i don’t have access to that channel
q
It's this same #1111009377525186570 channel
5 Views