What JSON Is Your n8n Workflow Actually Sending?
See the exact JSON n8n builds from {{ $json }} mappings. Paste an inspector URL, run the workflow, and read nested fields, nulls, and arrays.
An n8n HTTP Request node often sends a different body than the one you sketched. Expressions such as {{ $json.customer.email }} resolve at run time. Missing keys become null or disappear. Arrays get wrapped or flattened. Open the inspector and read the bytes n8n actually POSTs.
This page is the body. Setup (Webhook vs HTTP Request, test vs production URLs) lives on how to test webhooks in n8n.
Point HTTP Request at the inspector
Keep the OpenWebhook tab open. Copy the URL and append /n8n:
https://hooks.openwebhook.co/YOUR_UUID/n8n
In the node: method POST, that URL, body JSON. Map the fields the downstream API should see:
{
"orderId": "{{ $json.id }}",
"email": "{{ $json.customer.email }}",
"items": "{{ $json.line_items }}",
"total": "{{ $json.total }}"
}
Execute the node (or the workflow). You should see POST /n8n and the resolved object. If the node errors before “request sent”, the inspector stays empty.
What to look at
Select the request. Compare the mapped keys with the JSON on the left.
- Nested paths that were empty (
customermissing) often arrive asnullor as an omitted key. - An expression on an array can stringify to
"[object Object]"if you interpolated the array instead of passing it as JSON. - Numbers from n8n sometimes arrive as strings. Your handler’s schema will reject them.
- Extra keys from
$jsonleak if you spread the whole item.
Copy cURL from the inspector and replay the same body against the real API or a localhost listener.
curl -X POST \
'https://hooks.openwebhook.co/YOUR_UUID/n8n' \
-H 'content-type: application/json' \
--data '{"orderId":"ord_42","email":"ada@example.com","items":[{"sku":"tee","qty":1}],"total":2900}'
That sample is what a clean mapping looks like. If your captured body differs, fix the expressions before you change the handler.