How to receive data back from Make.com to Botpress...
# 📖tutorials
q
This is not a detailed Make.com tutorial, so I assume that everyone interested already knows the basics. Create a new scenario with two webhooks, the first being a Custom webhook and the second a Webhook response.
The second webhook body is the data you want to send back to Botpress, here I have a message "test-123".
In your chatbot Execute code card, use this:
Copy code
js
const webhookUrl = 'https://hook.eu2.make.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
try {
  const response = await axios.post(webhookUrl)
  const webhookResponse = response.data
  console.log(webhookResponse)
} catch (error) {
  console.log(error)
}
t
Can you make a video pic how to do this?
q
Then you can console.log the response from the Make.com webhook
you can download the chatbot file from here
I was kind of hoping that @flat-plumber-75402 would create it with Vimeo 💎 🙏
or @crooked-ram-87124 can fit it into his busy schedule 🛠️ 🦸
"This is not a Make.com tutorial" Obviously, in a real use case you would want to receive real data, so you put all that between those two webhooks in Make.com
c
yeah i have make and can totally make something on the topic
w
Great tutorial @quick-musician-29561, I've been dabbling with Make so thanks for posting
a
Those the make webhook response run custom JavaScript code like the execute card in botpress.
c
You two @quick-musician-29561 @crooked-ram-87124 are the best!!!!! 🥳
b
Mine was working until I added another process between the webhooks, then it just returns 'Accepted', and now even if I delete the process I added, it still doesn't work, could you help me please
q
Did you solve it already, or should we try to find the error together? ⚡
b
no I couldn't solve it
a
I'm having the same issue
b
@quick-musician-29561 please help
q
Ok, I can try to reproduce such an error 🫡
b
yeah but with paypal it didn't work
should I send you my bot and make automation?
q
Hi, today I'm available 🫡 It's good that you mentioned the error is with PayPal, that I haven't tried before. Normally if I disconnect modules, it can answer only 'Accepted' like you said, make.com accepted the data but the last webhook module didn't send anything back. But when I connect those again, I starts to work. So maybe there is some small error with how the JSON data needs to be organized in paypal module. If you're still facing the same issue, I can log in there and help you to find the error.
b
from what I ssaw here, the module "Custom Webhook" always sends an "Accepted" message, and I'm recieving that instead of the Webhook Response
q
yes, for me it has always meant that there is a small error in one of the modules, and the data doesn't go all the way to the last webhook (i.e. through the whole make.com scenario)
b
It goes through the whole scenario, when I try "Run Once", I can see the path and I see that the payment link is there. Maybe my code for recieving the webhook response is wrong?
q
You can share your make.com scenario with me if you want, that's one way we have worked together with other bot builders
b
how can I share it with you?
q
You can export it in make.com, then send DM that file to me
b
okay, when I get home (soon) I'll send you
q
Click those three little dots ... and Export Blueprint, then you'll get the file
It's 9:50 PM here, so I'll start with that in the morning
b
ok, sending you
q
☕ 🛠️ It's early Saturday morning and we have managed to solve two Make.com related problems already. It seems that most of the errors in Make.com projects are minor typos, or then additional code is needed in the Execute code card to get the desired result. So most of the times (if not always) it's not any Botpress or Make.com related issue at all.
@bland-advantage-2085 your case is the most difficult because I don't have the exact data and chatbot, but one way to solve this is that I clone your make.com schedule and send you the my webhook address. Once you send the sample data there one time, I can start debugging ⚡
also I don't have all the accounts connected to your project