Skip to content

Send traces from n8n

n8n workflows can send traces to Mibo three ways. Pick the one that fits your setup:

Option Works on What Mibo receives
Mibo Testing community node Cloud + self-hosted (any version) One span per executed node, including node input and output
Native OTLP export (n8n Preview) Self-hosted ≥ 2.19.0 One span per executed node, with counts and metadata but no node input or output
HTTP Request node Cloud + self-hosted (any version) The spans you build in the request body

Use the community node when your tests need message content, such as semantic assertions on the reply. The native export carries no node content, so evaluation on those traces is structural.

Community node Native OTLP export
Node input and output Yes No
Response text for semantic assertions Yes Only from the new n8n Agents, unverified
Structure and node_call assertions Yes Yes
Setup Node in the workflow Instance environment variables
Status Supported n8n Preview

Option 1 — Community node (Cloud + self-hosted)

Section titled “Option 1 — Community node (Cloud + self-hosted)”

The Mibo Testing community node is an open-source community node (npm) that captures execution data from your workflow and sends it to Mibo as a canonical Your API trace (reference). It walks the connection graph, emits one span per executed node, and POSTs plain JSON to /public/traces. It does not gzip requests. The node warns when its serialized trace is above about 8 MB. See the API payload limits for the endpoint’s limit.

Before connecting downstream nodes, review Include Input Data in Output for output behavior and binary attachment limitations.

Mibo Testing is a verified n8n community node. The n8n instance owner or an admin installs it.

  1. Open the nodes panel

    In a workflow, open the nodes panel with + or the N key.

  2. Find the node

    Search for Mibo Testing. It appears under More from the community.

  3. Install the node

    Select it and click Install. The node then appears in your nodes panel.

On self-hosted n8n, you can also install the npm package @mibo-ai/n8n-nodes-mibo-testing from Settings → Community Nodes. See n8n’s guide to installing verified community nodes. For a five-minute walkthrough, follow the n8n quickstart.

Add the Mibo Testing node after the nodes whose data you want to capture, typically at the very end of your workflow, right before the response is returned.

The node walks back through the workflow’s connection graph and captures every executed upstream node it can resolve. Captured node display labels become span.name in the trace, which is what your node_call assertions match against (case-insensitive substring).

  1. Double-click the Mibo Testing node to open its configuration panel.

  2. Click Credentials and create a new Mibo Testing credential:

    • API Key — your Mibo workspace API key from Settings.
    • n8n API Key (Optional) — lets the node enumerate workflow nodes and resolve input parameters, such as the URL on an HTTP Request node, for expected_arguments assertions. Without it, the node needs an upstream Get Workflow node, which also uses the n8n API. Create one in n8n under Settings → n8n API. On n8n Enterprise, you can limit it to the workflow:read scope. The n8n API is not available during the n8n Cloud free trial.
    • n8n API URL — defaults to http://localhost:5678/api/v1. On n8n Cloud, use https://<your-name>.app.n8n.cloud/api/v1. On other deployments, use https://<your-n8n-host>/api/v1.

Links this node to an agent in Mibo. Enter the agent ID from the Agent page’s URL. Leave it empty to use the workflow identity or a single-Agent key.

Optional override for the x-request-id header. If left blank, resolution order is:

  1. x-request-id on the workflow’s input items.
  2. x-request-id on executed output items.
  3. The n8n execution id.

Same x-request-id → Mibo replaces the previous trace. Different ID → new trace.

Attaches extra context (environment, version, custom key-value pairs) to the trace’s metadata object.

Off by default. With this option off, the node returns one item containing only an _miboTrace summary. Enable it under Options to return each input item’s original, unredacted JSON fields with an _miboTrace summary appended. Binary attachments are not included, whether sending the trace succeeds or the workflow continues after a send failure. Leave it off when downstream nodes do not need the input JSON fields.

How long the node waits for Mibo’s response before giving up. If the request fails with Settings → On Error set to Stop Workflow, the node raises an error and the workflow stops. To continue when Mibo is unreachable, open the node’s Settings tab and set On Error to Continue. The node then returns an _miboTrace summary with sent: false and the error details through its regular output.

For each captured workflow node, the trace includes one span:

  • name — n8n display label (e.g. “AI Agent”, “HTTP Request”, “Send Confirmation Email”).
  • parent_span_id — derived from the n8n connection graph. Filtered ancestors are skipped to the nearest captured one.
  • attributes:
    • n8n.node.type — internal type (e.g. n8n-nodes-base.httpRequest).
    • n8n.node.status — success / error.
    • n8n.node.output — JSON-stringified output.
    • n8n.node.parameters — resolved parameters (requires n8n API key).
    • For the response-producing node: gen_ai.response.text and gen_ai.output.messages.

Internal utility node types are auto-excluded.

  1. Save your workflow with the node configured.
  2. Run the workflow once manually or via a test trigger.
  3. Check Mibo — open the Agent’s Traces page. You should see a new trace with one span per captured node.

If the trace doesn’t appear:

  • API key — verify it matches what’s in your Mibo workspace.
  • Agent ID / scoping — check the key can access the Agent selected by the workflow or Agent ID.
  • Node enumeration — if neither the n8n API Key nor a Get Workflow node is wired in, the node throws; check the execution log.
  • Workflow ran — the node only fires when it’s actually reached.

Option 2 — Native OTLP export (self-hosted ≥ 2.19.0)

Section titled “Option 2 — Native OTLP export (self-hosted ≥ 2.19.0)”

Self-hosted n8n 2.19.0 and later can export OpenTelemetry traces natively. The export is an n8n Preview feature, so its format may change. Mibo accepts it on the same endpoint as other OTLP traces.

Use this configuration on the n8n main process, workers, and webhook processors. Replace <YOUR_API_KEY> with your Mibo API key and <YOUR_OTLP_SERVICE_NAME> with the Agent’s Service name.

Terminal window
N8N_OTEL_ENABLED=true
N8N_OTEL_EXPORTER_OTLP_ENDPOINT=https://api.mibo-ai.com/public
N8N_OTEL_EXPORTER_OTLP_TRACING_PATH=/traces
N8N_OTEL_EXPORTER_OTLP_HEADERS=x-api-key=<YOUR_API_KEY>
N8N_OTEL_EXPORTER_SERVICE_NAME=<YOUR_OTLP_SERVICE_NAME>

What each variable does:

Variable Purpose
N8N_OTEL_ENABLED Turns on n8n’s OpenTelemetry export.
N8N_OTEL_EXPORTER_OTLP_ENDPOINT The base URL for the export.
N8N_OTEL_EXPORTER_OTLP_TRACING_PATH Optional path override. The example uses /traces to send to /public/traces. The default appends /v1/traces to the base URL and sends to /public/v1/traces, which Mibo also accepts.
N8N_OTEL_EXPORTER_OTLP_HEADERS HTTP headers attached to every export request. Carries your Mibo API key. To keep the key out of the environment, use the _FILE variant of this variable.
N8N_OTEL_EXPORTER_SERVICE_NAME The service name Mibo uses to route traces to an Agent. n8n ignores OTEL_SERVICE_NAME.

n8n exports OTLP/HTTP protobuf, which Mibo accepts. An n8n instance has one service name, so it maps to one Mibo Agent unless an OpenTelemetry Collector rewrites the service name.

  1. Restart n8n so it reads the new variables.
  2. Run a production execution of a workflow. n8n exports only production executions by default, so a manual run from the editor does not send a trace.
  3. Open the Agent’s Traces page in Mibo.
  • The workflow.execute span is the root span and keeps its name.
  • Each node.execute span takes the node’s visible name from n8n.node.name, so node_call assertions match the name you see in n8n. A span without n8n.node.name keeps the name node.execute.
  • Node type, node ID, item counts, and execution attributes are kept as span attributes.
  • A node span with an error status or an exception event marks the trace as failed.
  • Every span can be matched by name, including workflow.execute.
  • n8n exports counts and metadata for each node, not its input or output. Classic AI Agent nodes carry no message content. Evaluation on these traces is structure-only: MUST_CALL and other node assertions, plus token_limit when token attributes are present. Semantic assertions on the response have no text to read.
  • The root span has no http.response.status_code, so http_status assertions have no data.
  • n8n exports only production executions by default.
  • n8n documents that its new Agents emit gen_ai.* prompts and responses. Mibo has not verified those attribute names.
  • Mibo has not verified that n8n Cloud can use this export. Use the community node on n8n Cloud.
  • In queue mode, node spans can become detached from the workflow span.

Option 3 — HTTP Request node (any version)

Section titled “Option 3 — HTTP Request node (any version)”

Send traces from any n8n workflow using the built-in HTTP Request node — no community package, no host config. Works on n8n Cloud and self-hosted, any version.

You add one HTTP Request node at the end of your workflow. It sends Mibo a small JSON describing what your workflow just did. Mibo can evaluate applicable tests against that trace. You don’t need to know OpenTelemetry or anything about tracing — copy the body below, change one field, you’re done.

  1. Add the node. At the end of your workflow, add an HTTP Request node (any name).

  2. Set Method to POST and URL to:

    https://api.mibo-ai.com/public/traces
  3. Add these three headers:

    Name Value
    x-api-key your Mibo API key
    content-type application/json
    x-request-id {{ $execution.id }}
  4. Set Body Content Type to JSON, turn on JSON body with expressions, and paste the minimal body below.

  5. Open the node’s Settings tab and set On Error to Continue. If the request to Mibo fails, the workflow continues.

That’s it. Save the workflow, run it, and the trace shows up in your Agent’s Traces page within seconds.

Copy this. Replace 'Final Reply' with the display name of the node whose response you want Mibo to evaluate, and .json.output with the field that holds the reply text.

{
"platformId": "<YOUR_AGENT_ID>",
"spans": [{
"span_id": "{{ $execution.id }}-root",
"name": "My Support Workflow",
"attributes": {
"gen_ai.response.text": "{{ $('Final Reply').item.json.output }}"
},
"status": { "code": 1 }
}]
}

What you need to know:

  • platformId — your agent’s ID, from the Agent page’s URL. If your API key is already scoped to a single agent, you can drop this field.
  • name — what you’ll see in the dashboard. Use a label your team will recognise.
  • gen_ai.response.text — the reply text. Mibo’s semantic and regex checks read from here.
  • x-request-id header — n8n’s execution id. Retries with the same id update the same trace (no duplicates).

You’ll get back {} and a 2xx status. The trace is accepted. See Passive Testing for evaluation eligibility and timing.

Add the matching attribute to the same attributes object. None of these are required — only add what you care about.

"gen_ai.usage.input_tokens": 120,
"gen_ai.usage.output_tokens": 80

Powers the token limit check. Pull the real numbers from your AI node’s output (e.g. {{ $('AI Agent').item.json.usage.input_tokens }}).

Add start_time_unix_nano and end_time_unix_nano to the span (nanoseconds, as strings):

"start_time_unix_nano": "{{ String(Date.parse($execution.startedAt) * 1000000) }}",
"end_time_unix_nano": "{{ String($now.toMillis() * 1000000) }}"

Powers the response time check.

"http.response.status_code": 200

Powers the HTTP status check. Useful when your workflow ends with an API call.

Add one extra span per tool, pointing at the AI span with parent_span_id:

{
"span_id": "{{ $execution.id }}-tool-1",
"parent_span_id": "{{ $execution.id }}-root",
"name": "create_booking",
"attributes": {
"gen_ai.tool.name": "create_booking",
"gen_ai.tool.call.arguments": "{\"date\":\"2026-06-12\",\"party\":4}"
},
"status": { "code": 1 }
}

Powers expected_tool_calls checks inside a node_call assertion — the AI used the right tool with the right arguments.

…other workflow nodes (so test cases can assert on them)

Section titled “…other workflow nodes (so test cases can assert on them)”

Add one span per node you care about, all with parent_span_id pointing at your root span. name should match the node’s display label in n8n — your node_call checks search by name.

Set "status": { "code": 2 } on any span that errored. Mibo marks the whole trace as failed.

For everything else — custom attributes, deep nesting, JSON-schema checks on payloads — see Your API reference and the Canonical Trace Reference.

You see What it means Fix
400 VALIDATION_ERROR Body is missing spans, or a span is missing span_id / name. Re-check the body shape.
400 CUSTOM_API_PLATFORM_NOT_FOUND Mibo can’t decide which agent this trace belongs to. Add platformId (the Agent ID from the Agent page’s URL), or use an API key scoped to one agent.
401 UNAUTHORIZED Wrong, missing or expired API key. Re-check the x-api-key header.
413 PAYLOAD_TOO_LARGE Body exceeds the API payload limit. Trim or skip large fields (full node outputs are the usual culprit).
5xx Temporary server issue. Mibo is fine with retries — same x-request-id won’t create duplicates.
Trace doesn’t show up Workflow didn’t reach the HTTP node, or the API key belongs to a different workspace. Run the workflow once manually and watch the HTTP node’s output.

Once traces are arriving, set up passive testing to evaluate them against applicable tests.