Why is there a difference between my Expression Editor result and output in Webhook Response Node and how to fix

Why is there a difference between my Expression Editor result and actual output in my Webhook Response Node and how to fix it so I get the expected result as my output?

Webhook Response Node → Setting: Respond with JSON

##Expression Editor
{
“results”: [
{
“toolCallId”: “{{ $(‘Webhook1’).item.json.body.message.toolCalls[0].id }}”,
“result”: {
“Business name”: “{{ $json.records[0].fields[‘Business Name’] }}”,
“What the business does”: “{{ $json.records[0].fields[‘Business Nature’] }}”,
“Call scenario”: “{{ $json.records[0].fields[‘Call scenario’] }}”,
“Additional relevant info”: “{{ $json.records[0].fields[‘Additional Relevant Info’] }}”
}
}
]
}

##Result (and expected output)

{
“results”: [
{
“toolCallId”: “call_QRMkhmR7daby3UYEA0l12HIy”,
“result”: {
“Business name”: “Jacksonville Glasses Limited”,
“What the business does”: “Sell glasses to royalty”,
“Call scenario”: “customer information call”,
“Additional relevant info”: “We’re currently out of stock”
}
}
]
}

##Actual Output JSON

NOTICE THIS FORMATTING IS DIFFERENT

[
{
“records”: [
{
“id”: “recjU2FhMSZiu8BQ1”,
“createdTime”: “2025-03-19T07:52:49.000Z”,
“fields”: {
“Business Name”: “Jacksonville Glasses Limited”,
“Call scenario”: “customer information call”,
“Business Nature”: “Sell glasses to royalty”,
“Additional Relevant Info”: “We’re currently out of stock”
}
}
]
}
]

Thanks for your help!

Hard to tell without seeing your workflow.
Maybe you have pinned data somewhere?
Also cleaning testing results cache (a trash bin icon next to Test Workflow button) could help.

If the above doesn’t help, please post your workflow using </> button here.

I figured it out thanks.

Node Output vs. Response Body: The output you are seeing is likely the output of the node execution, which shows the data that was passed into the node. This is different from the response body that is sent back to the webhook caller. The response body is what you have defined in the “Response Body” field of the “Respond to Webhook” node.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.