Skip to content

n8n Without the Testing Node

If you don’t want to install the Mibo Testing Node, you can send traces from n8n to Mibo using a standard HTTP Request node. This is useful if you want to get started quickly, can’t install community nodes, or prefer to keep your workflow self-contained.

  • A Mibo project with an n8n platform configured
  • A Mibo API key for that project (create one in Settings > API Keys)
  • Your platform ID (find it in the platform settings page)

You add two nodes at the end of your workflow:

  1. A Code node that collects outputs from your workflow nodes and builds the trace payload
  2. An HTTP Request node that sends the payload to Mibo’s trace endpoint
  1. Add a Code node

    Add a Code node at the end of your workflow, after all the nodes you want to capture. This node will build the trace payload.

    Paste this code into the Code node. It builds the trace payload in the optimized format that Mibo expects:

    // Collect outputs from the nodes you want to trace.
    // Replace these node names with your actual workflow node names.
    const nodesToCapture = ['Webhook', 'AI Agent', 'HTTP Request'];
    const traceData = {};
    for (const nodeName of nodesToCapture) {
    try {
    const nodeOutput = $node[nodeName].json;
    traceData[nodeName] = {
    output: nodeOutput,
    type: 'unknown', // n8n doesn't expose node types in expressions
    status: 'success'
    };
    } catch (e) {
    // Node didn't execute or doesn't exist, skip it
    }
    }
    // If you have an AI Agent node with tool calls, include them:
    // traceData['AI Agent'].tools_called = [
    // { name: 'search', input: { query: '...' }, output: { results: [...] } }
    // ];
    return {
    json: {
    payload: {
    data: {
    status: 'success',
    data: traceData,
    metadata: {
    workflow_id: $workflow.id,
    workflow_name: $workflow.name,
    timestamp: new Date().toISOString()
    }
    },
    platformId: 'YOUR_PLATFORM_ID',
    metadata: {
    workflowId: $workflow.id
    }
    }
    }
    };

    Replace nodesToCapture with the names of the nodes in your workflow that you want Mibo to evaluate. Replace YOUR_PLATFORM_ID with your actual platform ID.

  2. Add an HTTP Request node

    Add an HTTP Request node after the Code node.

    Configure it with these settings:

    • Method: POST
    • URL: https://api.mibo-ai.com/public/traces
    • Authentication: Header Auth
      • Name: x-api-key
      • Value: your Mibo API key
    • Send Body: JSON
    • Body Content Type: JSON
    • JSON: use an expression to reference the Code node output:
      {{ $json.payload }}
  3. Activate and test

    Save your workflow, then trigger it (e.g., by sending a message to the webhook). Check your Mibo dashboard. You should see a new trace appear for the platform.

If you just need semantic assertions (no node-level checks), you can skip the Code node entirely and send a minimal payload directly from the HTTP Request node:

{
"data": {
"text": "{{ $node['AI Agent'].json.text }}"
},
"platformId": "YOUR_PLATFORM_ID"
}

This is enough for semantic, response_regex, json_match, and json_schema assertions.

If your AI Agent node returns tools_called in its output, you can include them in the trace to enable node_call + expected_tool_calls assertions:

// In the Code node
const agentOutput = $node['AI Agent'].json;
return {
json: {
payload: {
data: {
status: 'success',
data: {
'AI Agent': {
output: agentOutput,
type: '@n8n/n8n-nodes-langchain.agent',
status: 'success',
tools_called: agentOutput.tools_called || []
}
}
},
platformId: 'YOUR_PLATFORM_ID'
}
}
};
FeatureTesting NodeHTTP Request approach
Node auto-detectionYes: discovers all nodes automaticallyNo: you manually list nodes to capture
HTTP Request node parametersYes: with n8n API KeyNo: only the node’s response output
Automatic compressionYes: gzip for payloads > 5 MBNo
x-request-id correlationYes: auto-detects from webhook headersNo: active testing won’t match traces
Node type detectionYes: includes full n8n type identifiersNo: type must be set manually or as "unknown"
Setup effortInstall once, works for all workflowsBuild the Code node per workflow