What are you trying to achieve?
Trying to send data to webhook fails. I have an ai agent for receiving calls that is supposed to send data to my webhook on Make AI.
This piece is failing and I am not sure why? Please see the code below:
Webhook response status: 400
Failed to send data to webhook: Bad Request
Error sending data to webhook: Error: Webhook request failed
at sendToWebhook (file:///home/runner/openai-realtime-api-voice-assistant/index.js:481:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async WebSocket. (file:///home/runner/openai-realtime-api-voice-assistant/index.js:434:13)
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
Error: Webhook request failed
at sendToWebhook (file:///home/runner/openai-realtime-api-voice-assistant/index.js:481:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async WebSocket. (file:///home/runner/openai-realtime-api-voice-assistant/index.js:434:13)
Any ideas how I can resolve that? I have set-up a webhook and added the link in my code so that the data gets sent there. I have not defined any data structure yet → but the data does not even get propagated to the webhook it seems…
Thanks
Screenshots: scenario setup, module configuration, errors
Hello @Romain_Forestier,
You’ve not mentioned or shared any details about Make’s scenario status.
The first thing is your webhook should be active, in your case also activate the scenario as well for testing purposes.
Then make sure you call webhook after clicking on “Re-determine data structure”
For more detailed reference check these help docs.
https://www.make.com/en/help/tools/webhooks#troubleshooting-webhooks
https://www.make.com/en/help/tools/webhooks#responding-to-webhooks
1 Like
Hello,
I figured it out → the webhook was not linked an active scenario. That’s now done.
I can retrieve the data when I run the scenario - could you let me know why nothing happens when I click “redetermine data structure”? I thought that, when you click that button, the data received by the webhook would be read and the data structure defined? See below my webhook data, but nothing happens when clicking that button.
- Is it crucial to set-up a data structure? Le’ts say as next step I want to capture this data in an excel file or Json table? How do I set-up the data structure for that?
Thanks!
Hello @Romain_Forestier,
When receiving a webhook call using “Re-determine data structure ”, it finds a structure and shows results based on the structure of the data.
Also, check “Supported incoming data formats” for webhooks https://www.make.com/en/help/tools/webhooks#supported-incoming-data-formats
Now comes another part about does format OR data structure always needs to be set for webhooks, The Answer is No. It’s only required when you are sure about your data structure and another thing is you want to validate the data structure for security reasons. Check more https://www.make.com/en/help/tools/webhooks#setting-up-webhook-data-structure
By default, it parses JSON data automatically, But there is an option to use “JSON pass-through”, If it is enabled then you can see your passed data as a string. See more here https://www.make.com/en/help/tools/webhooks#json-970384.
I hope this helps.
Hello @dilipborad,
I am a bit confused with the below: the data that I can see on the webhook and that I can then use to set-up data fields in excel and so on does not reflect the data that was actually just received in my last phone call?
The data that I see available to use as variables looks like this:
The last data received I can see on the last call’s log should be:
Question: how can I make use of that data in the workflow? I cannot use it to set-up a filter using “route” and also not select “data2” as a varaiable for the chatgpt completion or for excel?
I thought that the webhook would receive ALL of the data, and that then, I could route it and choose the relevant varables included in each route for building various workflows?
Maybe you could guide me here?
Thanks a lot,
Thanks - what i do not understand is how to retrieve the correct payload in the webhook? If I have say two routes with two payloads:
Route 1:
data1
data2
Route 2:
data1
data2
To build workflows like to store data in excel or do some summary or completions with chatgpt or other modules, I need to be able to select Route type (variable) as a filter between my router and the workflow. And also, I need to be able to select the route’s underlying variables in my workflow (eg. data2 from Route 2). How can I do that? Currently, it seems like I can only use the Route 1 → data1, data2 that I receive on the Webhook… however, I can see that normally I should be able to receive payloads for Route 2 for instance (see screenshot above of the log), and use its variables in the workflows?
Can someone ones help ?
Thank you,
Best
Hello @Romain_Forestier,
Those things are basic in Make.
That’s why I suggest you go to that Make Academy course.
Every webhook only has their set of data. for example, if you pass route 1: data(above mentioned) then only these data can be processed for that call. It can’t able to use/fetch/handle other webhooks data(like route 2).
If you need to use both of the data then pass it on a single call of webhook and then separate it using function or modules.
If the structure of webhook data is not fixed(multiple sets of data) then ⇒parse it ⇒Iterate it and use it in the next modules.
Without knowing the basics, if you go deeper then you get more confused.