N8n responds with HTTP 200, but returns empty data

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @TheAgentAutomator

Please, add more details. It’s totally not clear what you’re talking about.

Hi @TheAgentAutomator ,
since you didn’t provide more context . you can try this :

  • Open your Webhook node.
  • Change Respond from Immediately to When Last Node Finishes (or Using 'Respond to Webhook' Node).
  • Save and execute again.

My 1st webhook is set to respond to webook, Here’s the code in the respond to webhook. What’s happening is when I use Vapi, the AI agent is calling for the data but nothing is being return although the workflow is executing perfectly. For some reason it is returning a empty data set when using vapi

Hi @TheAgentAutomator ,

You are trying to grab toolCallId using $json.toolCallId, which tells n8n to look at the previous node (Search records). But if you look closely at your screenshot of the Search node, that ID isn’t there—only the warehouse data is. The toolCallId actually arrived way back at the start, in your Webhook node, and got “left behind” as you moved through the flow.

quick fix:

  1. Open that Expression node.
  2. Delete the $json.toolCallId value.
  3. Instead of just clicking “Current Node” in the variable selector, find your Webhook node (or whatever your trigger is named) on the left side.
  4. Dig into the JSON there to find the id. It usually looks something like: {{ $('Webhook').first().json.body.message.toolCalls[0].id }}

Once you map that ID directly from the source, Vapi will finally recognize which question you are answering!
let me know if this works for you.

2 Likes