KEEP LEARNING
Build the bigger picture.
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
Tips > Reliability & Performance
When the output panel does not show enough detail, or you need to inspect a specific nested property, insert a temporary Code node that logs the full data
To inspect data in n8n, insert a temporary Code node between the node that produces the data and the node that reads it. Log every item with console.log and JSON.stringify, then return the items unchanged. The output prints the exact structure to the server's stdout, revealing which nested properties actually exist so you can correct a failing expression.
When the output panel does not show enough detail, or you need to inspect a specific nested property, insert a temporary Code node that logs the full data structure. This is especially useful for debugging expression errors where you are not sure what properties exist on the incoming data.
Real-world example: An HTTP Request node returns a deeply nested JSON response and your expression {{ $json.data.results[0].metadata.tags }} returns undefined. You need to see the actual structure.
// Place this Code node between the HTTP Request node
// and the node that uses the expression.
// Log the complete structure of every incoming item
for (const item of $input.all()) {
console.log(
"=== ITEM DATA ===\n" +
JSON.stringify(item.json, null, 2)
);
}
// Pass all items through unchanged
return $input.all();The console.log output goes to the server's stdout (visible in Docker logs via docker logs n8n), not the browser UI. However, the Code node's output panel shows the returned items, so the debug technique works by passing data through.
The structured log reveals the actual data shape:
{
"data": {
"results": [
{
"meta": {
"tags": ["urgent", "billing"]
}
}
]
}
}Tip: The Fix. The property is meta.tags, not metadata.tags. The correct expression is {{ $json.data.results[0].meta.tags }}. Without the debug log, you would be guessing at property names from the API documentation, which often differs from the actual response.
This technique takes 30 seconds to set up and immediately reveals the exact data structure. Remove the debug Code node after fixing the issue.
Related: Always Set an Error Workflow on Every Production Workflow · Break Large Workflows into Sub-Workflows
KEEP LEARNING
The Workflow Engineer connects individual n8n concepts to testing, deployment and running a complete workflow.
APPLY IT TO YOUR SYSTEM
Bring the process, the tools involved and an example of where the current workflow gets stuck.