Skip to content

Traces: n8n

The n8n parser supports 3 formats, auto-detected from the trace structure. Use whichever matches how your data is produced.

This is what the Mibo Testing Node produces in Get Workflow mode, and is the format we recommend if you’re building your own integration.

The key idea is simple: use each node name as a key, mapping it to an object with its output, type, and status. This flat map structure lets Mibo match nodes by name directly, which is what makes node_call assertions work.

{
"data": {
"status": "success",
"data": {
"Webhook": {
"output": {
"headers": { "host": "n8n.example.com" },
"body": { "message": "Hello" }
},
"type": "n8n-nodes-base.webhook",
"status": "success"
},
"AI Agent": {
"output": {
"text": "Here is your stock analysis for AAPL..."
},
"type": "@n8n/n8n-nodes-langchain.agent",
"status": "success",
"tools_called": [
{
"name": "calculate_rsi",
"input": { "symbol": "AAPL" },
"output": { "rsi": 65.4 }
}
]
},
"HTTP Request": {
"output": {
"price": 189.50,
"volume": 52340000
},
"parameters": {
"url": "https://api.stocks.com/quotes",
"method": "GET"
},
"type": "n8n-nodes-base.httpRequest",
"status": "success"
}
},
"metadata": {
"workflow_id": "wf-abc123",
"workflow_name": "Stock Analysis"
}
}
}

In the example above, "AI Agent", "Webhook", and "HTTP Request" are the node names, the same names you’d use in expected_name when writing node_call assertions. Each node’s output becomes the data Mibo checks with expected_arguments. For HTTP Request nodes, Mibo also resolves the node’s input parameters (including n8n expressions like ={{ $json.targetUrl }}) and merges them in, so you can assert on the configured URL, method, and other settings.

How Mibo detects this format: the inner data object has a root status field and contains nodes with an output key. This detection only runs inside the n8n parser.

Structure:

FieldRequiredDescription
statusYes"success", "error", or "partial"
dataYesMap of node names to their data
data[node].outputYesThe node’s output (becomes NodeCall.arguments)
data[node].typeYesn8n node type (e.g., n8n-nodes-base.httpRequest)
data[node].statusYes"success", "error", or "skipped"
data[node].tools_calledNoArray of tool calls (only for AI agent nodes)
data[node].parametersNoResolved node configuration (e.g., url, method). Present in API polling mode (always) and in Mibo Testing Node auto-detect mode (requires n8n API Key in node credentials).
metadataNoWorkflow metadata

Tool call format (inside tools_called):

FieldRequiredDescription
nameYesTool/function name
inputYesInput passed to the tool
outputYesTool’s response

When using the Mibo Testing Node in auto-detect mode with an n8n API Key, the trace includes parameters for each node, including HTTP Request nodes. This means you can assert on the URL, method, and other settings that the node was configured with, not just its response output.

For example, if your workflow has an HTTP Request node called “Fetch Stock Data” that calls a stock API, you can verify it used the correct URL:

{
"target": "node_call",
"condition": "MUST_CALL",
"expected_name": "Fetch Stock Data",
"expected_arguments": {
"url": { "matcher": "contains", "value": "api.stocks.com" },
"method": "GET"
}
}

n8n expressions like ={{ $json.targetUrl }} are resolved automatically against other nodes’ outputs before being included in the trace, so the parameters contain the actual runtime values.

Section titled “Format 2: Manual Node Names (not recommended)”

This is what the Mibo Testing Node produces in Manual Node Names mode. It uses an array of node objects instead of a flat map.

{
"data": {
"data": {
"nodes": [
{
"nodeName": "Webhook",
"items": [
{ "json": { "body": { "message": "Hello" } } }
]
},
{
"nodeName": "AI Agent",
"items": [
{
"json": {
"text": "Here is your analysis...",
"tools_called": [
{
"name": "calculate_rsi",
"input": { "symbol": "AAPL" },
"output": { "rsi": 65.4 }
}
]
}
}
]
}
]
}
}
}

How Mibo detects this format: no root status field, and data.nodes is an array.

Key difference: Nodes are in an array with nodeName and items[], instead of a flat map. Tool calls go inside items[].json.tools_called.

This is n8n’s native execution data format (what the n8n Public API returns). When you provide an n8n API key in your platform config, Mibo polls this API automatically — you don’t need to send this data yourself.

How Mibo detects this format: falls through when neither optimized nor manual mode format is detected. Looks for data.resultData.runData.

When your workflow uses an AI Agent node with tools (e.g., a PostgreSQL tool, an HTTP Request tool, a Code tool), Mibo automatically detects which tools the agent called and what arguments the LLM sent to each one. This works out of the box — no MiboTesting node needed.

You can then use expected_tool_calls to verify the agent’s behavior:

{
"target": "node_call",
"condition": "MUST_CALL",
"expected_name": "AI Agent",
"expected_tool_calls": [
{
"condition": "MUST_CALL",
"expected_name": "Execute a SQL query in Postgres",
"expected_arguments": {
"query": { "matcher": "regex", "value": "(?i)^\\s*SELECT" }
}
}
]
}

Mibo auto-detects the response text using this priority:

  1. AI node detection: finds nodes with types containing langchain, openai, gemini, anthropic, azure, ollama
  2. Last non-trigger node: excludes nodes with types matching webhook, trigger, start, manualTrigger
  3. Common keys: searches for text, output, message, content, response in the node’s output

For per-assertion targeting, use target_node and output_key in semantic assertions:

{
"criteria": "Must provide accurate analysis",
"target_node": "AI Agent",
"output_key": "text"
}
Assertion typeWorks?What it checks
SemanticYesEvaluates extracted text
node_callYesChecks if a workflow node was executed
node_call + expected_tool_callsYesChecks AI agent tool calls
node_call + expected_argumentsYesChecks node output values
json_matchYesChecks fields in the response
response_regexYesMatches pattern against text
json_schemaYesValidates response structure
token_limitAutomatic if AI node output includes a supported token formatSums usage across all AI nodes

For token_limit to work in trace push mode, the AI node’s output must include token usage data in a supported format. Most providers return this automatically.

Google Gemini native (returned by the @n8n/n8n-nodes-langchain.googleGemini node):

{
"AI Node": {
"output": {
"content": { "parts": [{ "text": "response" }] },
"usageMetadata": {
"promptTokenCount": 150,
"candidatesTokenCount": 200,
"totalTokenCount": 350
}
},
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"status": "success"
}
}

LangChain-normalized format (returned by LangChain agent nodes):

{
"AI Agent": {
"output": {
"text": "response",
"usageMetadata": {
"input_tokens": 100,
"output_tokens": 80,
"total_tokens": 180
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"status": "success"
}
}

When multiple AI nodes are present, Mibo sums the token usage across all of them.

Terminal window
curl -X POST "https://api.mibo-ai.com/public/traces" \
-H "Content-Type: application/json" \
-H "x-api-key: mibo_your_api_key" \
-d '{
"data": {
"status": "success",
"data": {
"Webhook": {
"output": { "body": { "message": "Analyze AAPL" } },
"type": "n8n-nodes-base.webhook",
"status": "success"
},
"AI Agent": {
"output": { "text": "AAPL is trading at $189.50 with RSI of 65.4" },
"type": "@n8n/n8n-nodes-langchain.agent",
"status": "success",
"tools_called": [
{
"name": "calculate_rsi",
"input": { "symbol": "AAPL" },
"output": { "rsi": 65.4 }
}
]
}
}
},
"metadata": { "workflowId": "wf-abc123" }
}'